Fyne API "container.DocTabs"
container.DocTabs
import "fyne.io/fyne/v2/container"
Usage
type DocTabs
type DocTabs struct {
widget.BaseWidget
Items []*TabItem
CreateTab func() *TabItem
CloseIntercept func(*TabItem)
OnClosed func(*TabItem)
OnSelected func(*TabItem)
OnUnselected func(*TabItem)
}
DocTabs container is used to display various pieces of content 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.
2.1
func NewDocTabs
func NewDocTabs(items ...*TabItem) *DocTabs
NewDocTabs creates a new tab container that allows the user to choose between various pieces of content.
2.1
func (*DocTabs) Append
func (t *DocTabs) Append(item *TabItem)
Append adds a new TabItem to the end of the tab bar.
func (*DocTabs) CreateRenderer
func (t *DocTabs) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
fyne.Widget
func (*DocTabs) DisableIndex
func (t *DocTabs) DisableIndex(i int)
DisableIndex disables the TabItem at the specified index.
2.3
func (*DocTabs) DisableItem
func (t *DocTabs) DisableItem(item *TabItem)
DisableItem disables the specified TabItem.
2.3
func (*DocTabs) EnableIndex
func (t *DocTabs) EnableIndex(i int)
EnableIndex enables the TabItem at the specified index.
2.3
func (*DocTabs) EnableItem
func (t *DocTabs) EnableItem(item *TabItem)
EnableItem enables the specified TabItem.
2.3
func (*DocTabs) Hide
func (t *DocTabs) Hide()
Hide hides the widget.
fyne.CanvasObject
func (*DocTabs) MinSize
func (t *DocTabs) MinSize() fyne.Size
MinSize returns the size that this widget should not shrink below
fyne.CanvasObject
func (*DocTabs) Remove
func (t *DocTabs) Remove(item *TabItem)
Remove tab by value.
func (*DocTabs) RemoveIndex
func (t *DocTabs) RemoveIndex(index int)
RemoveIndex removes tab by index.
func (*DocTabs) Select
func (t *DocTabs) Select(item *TabItem)
Select sets the specified TabItem to be selected and its content visible.
func (*DocTabs) SelectIndex
func (t *DocTabs) SelectIndex(index int)
SelectIndex sets the TabItem at the specific index to be selected and its content visible.
func (*DocTabs) Selected
func (t *DocTabs) Selected() *TabItem
Selected returns the currently selected TabItem.
func (*DocTabs) SelectedIndex
func (t *DocTabs) SelectedIndex() int
SelectedIndex returns the index of the currently selected TabItem.
func (*DocTabs) SetItems
func (t *DocTabs) SetItems(items []*TabItem)
SetItems sets the containers items and refreshes.
func (*DocTabs) SetTabLocation
func (t *DocTabs) SetTabLocation(l TabLocation)
SetTabLocation sets the location of the tab bar
func (*DocTabs) Show
func (t *DocTabs) Show()
Show this widget, if it was previously hidden
fyne.CanvasObject