Fyne API "container.AppTabs"

container.AppTabs


import "fyne.io/fyne/v2/container"

Usage

type AppTabs

type AppTabs struct {
	widget.BaseWidget

	Items []*TabItem

	// Deprecated: Use `OnSelected func(*TabItem)` instead.
	OnChanged    func(*TabItem)
	OnSelected   func(*TabItem)
	OnUnselected func(*TabItem)
}

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

func NewAppTabs(items ...*TabItem) *AppTabs

NewAppTabs creates a new tab container that allows the user to choose between different areas of an app.

Since: 1.4

func (*AppTabs) Append

func (t *AppTabs) Append(item *TabItem)

Append adds a new TabItem to the end of the tab bar.

func (*AppTabs) CreateRenderer

func (t *AppTabs) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

Implements: fyne.Widget

func (*AppTabs) CurrentTab

func (t *AppTabs) CurrentTab() *TabItem

CurrentTab returns the currently selected TabItem.

Deprecated: Use `AppTabs.Selected() *TabItem` instead.

func (*AppTabs) CurrentTabIndex

func (t *AppTabs) CurrentTabIndex() int

CurrentTabIndex returns the index of the currently selected TabItem.

Deprecated: Use `AppTabs.SelectedIndex() int` instead.

func (*AppTabs) DisableIndex

func (t *AppTabs) DisableIndex(i int)

DisableIndex disables the TabItem at the specified index.

Since: 2.3

func (*AppTabs) DisableItem

func (t *AppTabs) DisableItem(item *TabItem)

DisableItem disables the specified TabItem.

Since: 2.3

func (*AppTabs) EnableIndex

func (t *AppTabs) EnableIndex(i int)

EnableIndex enables the TabItem at the specified index.

Since: 2.3

func (*AppTabs) EnableItem

func (t *AppTabs) EnableItem(item *TabItem)

EnableItem enables the specified TabItem.

Since: 2.3

func (*AppTabs) ExtendBaseWidget

func (t *AppTabs) ExtendBaseWidget(wid fyne.Widget)

ExtendBaseWidget is used by an extending widget to make use of BaseWidget functionality.

Deprecated: Support for extending containers is being removed

func (*AppTabs) Hide

func (t *AppTabs) Hide()

Hide hides the widget.

Implements: fyne.CanvasObject

func (*AppTabs) MinSize

func (t *AppTabs) MinSize() fyne.Size

MinSize returns the size that this widget should not shrink below

Implements: fyne.CanvasObject

func (*AppTabs) Remove

func (t *AppTabs) Remove(item *TabItem)

Remove tab by value.

func (*AppTabs) RemoveIndex

func (t *AppTabs) RemoveIndex(index int)

RemoveIndex removes tab by index.

func (*AppTabs) Select

func (t *AppTabs) Select(item *TabItem)

Select sets the specified TabItem to be selected and its content visible.

func (*AppTabs) SelectIndex

func (t *AppTabs) SelectIndex(index int)

SelectIndex sets the TabItem at the specific index to be selected and its content visible.

func (*AppTabs) SelectTab

func (t *AppTabs) SelectTab(item *TabItem)

SelectTab sets the specified TabItem to be selected and its content visible.

Deprecated: Use `AppTabs.Select(*TabItem)` instead.

func (*AppTabs) SelectTabIndex

func (t *AppTabs) SelectTabIndex(index int)

SelectTabIndex sets the TabItem at the specific index to be selected and its content visible.

Deprecated: Use `AppTabs.SelectIndex(int)` instead.

func (*AppTabs) Selected

func (t *AppTabs) Selected() *TabItem

Selected returns the currently selected TabItem.

func (*AppTabs) SelectedIndex

func (t *AppTabs) SelectedIndex() int

SelectedIndex returns the index of the currently selected TabItem.

func (*AppTabs) SetItems

func (t *AppTabs) SetItems(items []*TabItem)

SetItems sets the containers items and refreshes.

func (*AppTabs) SetTabLocation

func (t *AppTabs) SetTabLocation(l TabLocation)

SetTabLocation sets the location of the tab bar

func (*AppTabs) Show

func (t *AppTabs) Show()

Show this widget, if it was previously hidden

Implements: fyne.CanvasObject