DVX_GUI/widgets/tabControl/tabctrl.dhs

62 lines
1.5 KiB
Text

.section Widgets
.topic widget.tabcontrol
.title TabControl
.toc 0 TabControl
.index TabControl
.index TabPage
.index wgtTabControl
.index wgtTabPage
.index wgtTabControlSetActive
.index wgtTabControlGetActive
.h2 TabControl
A tabbed container that displays one page at a time with clickable tabs along the top. Each tab page is a container that holds its own child widgets.
Header: widgets/widgetTabControl.h
.h3 Creation
.code
WidgetT *tabs = wgtTabControl(parent);
WidgetT *page1 = wgtTabPage(tabs, "General");
WidgetT *page2 = wgtTabPage(tabs, "Advanced");
// add children to page1, page2...
.endcode
.h3 Macros
.table
Macro Description
----- -----------
wgtTabControl(parent) Create a tab control.
wgtTabPage(parent, title) Add a tab page with the given title. Returns the page container widget.
wgtTabControlSetActive(w, idx) Set the active tab by index (0-based).
wgtTabControlGetActive(w) Get the index of the active tab.
.endtable
.h3 Events
.table
Callback Description
-------- -----------
onChange Fires when the active tab changes.
.endtable
.h3 Properties (BASIC Interface)
.table
Property Type Access Description
-------- ---- ------ -----------
TabIndex Integer Read/Write Index of the currently active tab (0-based).
.endtable
.h3 Methods (BASIC Interface)
.table
Method Description
------ -----------
SetActive Set the active tab by index.
.endtable
.hr