Standard layouts
As there are many standard layout algorithms, the Fyne toolkit includes a collection of standard implementations in the layout
package. By importing this package, you can apply these layouts to any Container
in your application:
import "fyne.io/fyne/v2/layout"
Each of the layouts is examined in detail in this section. Although a container can only have a single layout, there is no limit to the number of containers you can have nested inside each other, and so we look at combining different layouts at the end of this section.
MaxLayout
MaxLayout (or maximum layout) is the simplest of all the built-in layout algorithms. Its purpose is to ensure that all child elements of a container take up the full space of that container:
This is most commonly used to align one element over another, such as a text item over a background color rectangle. When using this layout, it is important...