Documentation ¶
Overview ¶
Package container provides container widgets that are used to lay out and organise applications
Index ¶
- func NewAdaptiveGrid(rowcols int, objects ...fyne.CanvasObject) *fyne.Container
- func NewBorder(top, bottom, left, right fyne.CanvasObject, objects ...fyne.CanvasObject) *fyne.Container
- func NewCenter(objects ...fyne.CanvasObject) *fyne.Container
- func NewGridWithColumns(cols int, objects ...fyne.CanvasObject) *fyne.Container
- func NewGridWithRows(rows int, objects ...fyne.CanvasObject) *fyne.Container
- func NewGridWrap(size fyne.Size, objects ...fyne.CanvasObject) *fyne.Container
- func NewHBox(objects ...fyne.CanvasObject) *fyne.Container
- func NewMax(objects ...fyne.CanvasObject) *fyne.Container
- func NewPadded(objects ...fyne.CanvasObject) *fyne.Container
- func NewVBox(objects ...fyne.CanvasObject) *fyne.Container
- type AppTabs
- type Scroll
- type ScrollDirection
- type Split
- type TabItem
- type TabLocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdaptiveGrid ¶
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.
Since: 1.4
func NewBorder ¶
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.
Since: 1.4
func NewCenter ¶
func NewCenter(objects ...fyne.CanvasObject) *fyne.Container
NewCenter creates a new container with the specified objects centered in the available space.
Since: 1.4
func NewGridWithColumns ¶
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.
Since: 1.4
func NewGridWithRows ¶
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 columns. The number of columns will depend on how many children are in the container.
Since: 1.4
func NewGridWrap ¶
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.
Since: 1.4
func NewHBox ¶
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.
Since: 1.4
func NewMax ¶
func NewMax(objects ...fyne.CanvasObject) *fyne.Container
NewMax creates a new container with the specified objects filling the available space.
Since: 1.4
Types ¶
type AppTabs ¶
type AppTabs = widget.TabContainer
AppTabs container is used to split your application into various different areas identified by tabs. The tabs contain text and/or an icon and allow the user to switch between the content specified in each TabItem. Each item is represented by a button at the edge of the container.
Since: 1.4
func NewAppTabs ¶
NewAppTabs creates a new tab container that allows the user to choose between different areas of an app.
Since: 1.4
type Scroll ¶
type Scroll = widget.ScrollContainer
Scroll defines a container that is smaller than the Content. The Offset is used to determine the position of the child widgets within the container.
Since: 1.4
func NewHScroll ¶
func NewHScroll(content fyne.CanvasObject) *Scroll
NewHScroll create a scrollable parent wrapping the specified content. Note that this may cause the MinSize.Width to be smaller than that of the passed object.
Since: 1.4
func NewScroll ¶
func NewScroll(content fyne.CanvasObject) *Scroll
NewScroll creates a scrollable parent wrapping the specified content. Note that this may cause the MinSize to be smaller than that of the passed object.
Since: 1.4
func NewVScroll ¶
func NewVScroll(content fyne.CanvasObject) *Scroll
NewVScroll a scrollable parent wrapping the specified content. Note that this may cause the MinSize.Height to be smaller than that of the passed object.
Since: 1.4
type ScrollDirection ¶
type ScrollDirection = widget.ScrollDirection
ScrollDirection represents the directions in which a Scroll container can scroll its child content.
Since: 1.4
const ( ScrollBoth ScrollDirection = iota ScrollHorizontalOnly ScrollVerticalOnly )
Constants for valid values of ScrollDirection.
type Split ¶
type Split = widget.SplitContainer
Split defines a container whose size is split between two children.
Since: 1.4
func NewHSplit ¶
func NewHSplit(leading, trailing fyne.CanvasObject) *Split
NewHSplit creates a horizontally arranged container with the specified leading and trailing elements. A vertical split bar that can be dragged will be added between the elements.
Since: 1.4
func NewVSplit ¶
func NewVSplit(top, bottom fyne.CanvasObject) *Split
NewVSplit creates a vertically arranged container with the specified top and bottom elements. A horizontal split bar that can be dragged will be added between the elements.
Since: 1.4
type TabItem ¶
TabItem represents a single view in a TabContainer. The Text and Icon are used for the tab button and the Content is shown when the corresponding tab is active.
Since: 1.4
func NewTabItem ¶
func NewTabItem(text string, content fyne.CanvasObject) *TabItem
NewTabItem creates a new item for a tabbed widget - each item specifies the content and a label for its tab.
Since: 1.4
func NewTabItemWithIcon ¶
NewTabItemWithIcon creates a new item for a tabbed widget - each item specifies the content and a label with an icon for its tab.
Since: 1.4
type TabLocation ¶
type TabLocation = widget.TabLocation
TabLocation is the location where the tabs of a tab container should be rendered
Since: 1.4
const ( TabLocationTop TabLocation = iota TabLocationLeading TabLocationBottom TabLocationTrailing )
TabLocation values