redirect_to | layout | tags | title | |
---|---|---|---|---|
page |
|
Fyne API "container" |
import "fyne.io/fyne/v2/container"
Package container provides container widgets that are used to lay out and organise applications
func New(layout fyne.Layout, objects ...fyne.CanvasObject) *fyne.Container
New returns a new Container instance holding the specified CanvasObjects which will be laid out according to the specified Layout.
2.0
func NewAdaptiveGrid(rowcols int, objects ...fyne.CanvasObject) *fyne.Container
NewAdaptiveGrid creates a new container with the specified objects and using the grid layout. When in a horizontal arrangement the rowcols parameter will specify the column count, when in vertical it will specify the rows. On mobile this will dynamically refresh when device is rotated.
1.4
func NewBorder(top, bottom, left, right fyne.CanvasObject, objects ...fyne.CanvasObject) *fyne.Container
NewBorder creates a new container with the specified objects and using the border layout. The top, bottom, left and right parameters specify the items that should be placed around edges, the remaining elements will be in the center. Nil can be used to an edge if it should not be filled.
1.4
func NewCenter(objects ...fyne.CanvasObject) *fyne.Container
NewCenter creates a new container with the specified objects centered in the available space.
1.4
func NewGridWithColumns(cols int, objects ...fyne.CanvasObject) *fyne.Container
NewGridWithColumns creates a new container with the specified objects and using the grid layout with a specified number of columns. The number of rows will depend on how many children are in the container.
1.4
func NewGridWithRows(rows int, objects ...fyne.CanvasObject) *fyne.Container
NewGridWithRows creates a new container with the specified objects and using the grid layout with a specified number of rows. The number of columns will depend on how many children are in the container.
1.4
func NewGridWrap(size fyne.Size, objects ...fyne.CanvasObject) *fyne.Container
NewGridWrap creates a new container with the specified objects and using the gridwrap layout. Every element will be resized to the size parameter and the content will arrange along a row and flow to a new row if the elements don't fit.
1.4
func NewHBox(objects ...fyne.CanvasObject) *fyne.Container
NewHBox creates a new container with the specified objects and using the HBox layout. The objects will be placed in the container from left to right.
1.4
func NewMax(objects ...fyne.CanvasObject) *fyne.Container
NewMax creates a new container with the specified objects filling the available space.
1.4
func NewPadded(objects ...fyne.CanvasObject) *fyne.Container
NewPadded creates a new container with the specified objects inset by standard padding size.
1.4
func NewVBox(objects ...fyne.CanvasObject) *fyne.Container
NewVBox creates a new container with the specified objects and using the VBox layout. The objects will be stacked in the container from top to bottom.
1.4
func NewWithoutLayout(objects ...fyne.CanvasObject) *fyne.Container
NewWithoutLayout returns a new Container instance holding the specified CanvasObjects that are manually arranged.
2.0