Reader small image

You're reading from  Building Cross-Platform GUI Applications with Fyne

Product typeBook
Published inJan 2021
PublisherPackt
ISBN-139781800563162
Edition1st Edition
Tools
Right arrow
Author (1)
Andrew Williams
Andrew Williams
author image
Andrew Williams

Andrew Williams graduated from the University of Edinburgh in 2003 with a bachelor's degree, with honors, in computer science. After university, he went to work as a software engineer and has gained over 15 years of commercial software development experience across a variety of programming languages, including Java, C, Objective-C, and Go. Andrew has spent many years working as a CTO with many early-stage and growing software start-ups. He has been a core developer in large open source projects, including Enlightenment, EFL, and Maven, as well as involved in maintaining various community websites and tutorials. Andrew's passion for building tools and services that make software development simpler led him to start authoring books on the subject.
Read more about Andrew Williams

Right arrow

Implementing an image browser application

This application will load a directory that contains some images, provide a summary of the content in a status bar at the bottom of the window, and use most of the space to show each image. The images will be loaded as thumbnails (smaller versions of the images) and we will display the image information under each thumbnail.

Creating the layout

To start this example, we will create the layout of the application and the image items that will display in the central grid. Let's understand each of these actions in detail:

  1. First, we set up the image items. We wish to have the image name underneath the image. While this could be positioned manually, the items will be more responsive to changes in size if we use BorderLayout. We will create a canvas.Text element in the bottom position and use canvas.Rectangle to represent the image that we will load later:
    func makeImageItem() fyne.CanvasObject {
         label...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Building Cross-Platform GUI Applications with Fyne
Published in: Jan 2021Publisher: PacktISBN-13: 9781800563162

Author (1)

author image
Andrew Williams

Andrew Williams graduated from the University of Edinburgh in 2003 with a bachelor's degree, with honors, in computer science. After university, he went to work as a software engineer and has gained over 15 years of commercial software development experience across a variety of programming languages, including Java, C, Objective-C, and Go. Andrew has spent many years working as a CTO with many early-stage and growing software start-ups. He has been a core developer in large open source projects, including Enlightenment, EFL, and Maven, as well as involved in maintaining various community websites and tutorials. Andrew's passion for building tools and services that make software development simpler led him to start authoring books on the subject.
Read more about Andrew Williams