fyne.Container
import "fyne.io/fyne/v2"Usage
type Container
type Container struct {
Hidden bool // Is this Container hidden
Layout Layout // The Layout algorithm for arranging child [CanvasObject]s
Objects []CanvasObject // The set of [CanvasObject]s this container holds
}Container is a [CanvasObject] that contains a collection of child objects. The layout of the children is set by the specified Layout.
func NewContainer
func NewContainer(objects ...CanvasObject) *ContainerNewContainer returns a new [Container] instance holding the specified [CanvasObject]s.
func NewContainerWithLayout
func NewContainerWithLayout(layout Layout, objects ...CanvasObject) *ContainerNewContainerWithLayout returns a new [Container] instance holding the specified [CanvasObject]s which will be laid out according to the specified Layout.
func NewContainerWithoutLayout
func NewContainerWithoutLayout(objects ...CanvasObject) *ContainerNewContainerWithoutLayout returns a new [Container] instance holding the specified [CanvasObject]s that are manually arranged.
func (*Container) Add
func (c *Container) Add(add CanvasObject)Add appends the specified object to the items this container manages.
1.4func (*Container) AddObject
func (c *Container) AddObject(o CanvasObject)AddObject adds another [CanvasObject] to the set this Container holds.
func (*Container) Hide
func (c *Container) Hide()Hide sets this container, and all its children, to be not visible.
func (*Container) MinSize
func (c *Container) MinSize() SizeMinSize calculates the minimum size of c. This is delegated to the [Container.Layout], if specified, otherwise it will be calculated.
func (*Container) Move
func (c *Container) Move(pos Position)Move the container (and all its children) to a new position, relative to its parent.
func (*Container) Position
func (c *Container) Position() PositionPosition gets the current position of c relative to its parent.
func (*Container) Refresh
func (c *Container) Refresh()Refresh causes this object to be redrawn in its current state
func (*Container) Remove
func (c *Container) Remove(rem CanvasObject)Remove updates the contents of this container to no longer include the specified object. This method is not intended to be used inside a loop, to remove all the elements. It is much more efficient to call [Container.RemoveAll) instead.
func (*Container) RemoveAll
func (c *Container) RemoveAll()RemoveAll updates the contents of this container to no longer include any objects.
2.2func (*Container) Resize
func (c *Container) Resize(size Size)Resize sets a new size for c.
func (*Container) Show
func (c *Container) Show()Show sets this container, and all its children, to be visible.
func (*Container) Size
func (c *Container) Size() SizeSize returns the current size c.
func (*Container) Visible
func (c *Container) Visible() boolVisible returns true if the container is currently visible, false otherwise.