-
-
Notifications
You must be signed in to change notification settings - Fork 8
TabGroup
Jaliborc edited this page Jul 18, 2012
·
4 revisions
TabGroup is a frame class which automatically arranges tab buttons. Inherits from Group and uses other Sushi classes for instantiating tab buttons.
Name | Description |
---|---|
AddTab(value [,text] [,tip] [,disabled]) | Adds a new tab to the group, identified by "value". If a tab with the same "value" already exists, replaces it. If "text" is not provided, "value" will be used as the display text. If "tip" is set, a mouse-hover tooltip will be provided for the tab. If "disabled" is set to true, the tab will be displayed in a disabled state. |
GetTab(value) | Returns all the values associated with the tab: "text", "tip" and "disabled". |
ClearTabs() | Wipes all the tabs. |
SetSelection(value), SetValue(value) | Sets which tab should be displayed in the selected state, identified by "value". |
GetSelection(), GetValue() | Returns the "value" of which tab is displayed in the selected state. |
SetStyle(style) | Sets the tab button class to be used by the group (should expose the same functionality as TabButtonBase). Currently accepted values: "Tooltip", "Panel" and "Dialog". |
GetStyle() | Returns the tab button class used by the group. "Panel" by default. |
Name | Description |
---|---|
OnUpdate | Fired whenever one of the group's children fires "OnUpdate", before re-initializing the content. |
OnInput | Fired whenever one of the group's children fires "OnInput", unless an "OnInput" handler is set for the child. |
myGroup = SushiTabGroup()
myGroup:SetStyle('Tooltip') -- use SushiTooltipTab
myGroup:AddTab(1, 'Banana')
myGroup:AddTab('Strawberry')
myGroup:AddTab(2, 'Apple', 'Apples are disabled.', true)
This is the Sushi-3.1 wiki. Wiki Home