public class TabWidget extends Container:
Closable tab container.
tabs = TabWidget()
tabs.addTab("Welcome", Label("Ready"), false)
tabs.addTab("Query.sql", editor, true)| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | activeIndexactiveIndex as Int: |
Index of the currently visible tab. |
| public readonly property | activeTitleactiveTitle as String: |
Title of the selected tab. |
| public readonly property | activeWidgetactiveWidget as Widget: |
Widget currently hosted by the selected tab, or null when empty. |
| public property | addButtonWidthaddButtonWidth as Int = 34 |
Width of the optional leading add-tab button. |
| public override readonly property | childCountchildCount as ULong: |
Number of hosted tab widgets. |
| public property | closeAreaWidthcloseAreaWidth as Int = 30 |
Area reserved at the right of a closeable tab for its close button. |
| public property | showAddButtonshowAddButton as Boolean = false |
Whether a leading + button is displayed before the tab list. |
| public property | showTabBarshowTabBar as Boolean = true |
Whether the tab strip is visible at the configured tab position. |
| public property | tabHeighttabHeight as Int = 34 |
Tab header height in pixels. |
| public property | tabPositiontabPosition as TabPosition = TabPosition.TOP |
Edge used to display the tab strip. |
| Modifier and Type | Member | Description |
|---|---|---|
| public event | addTabRequestedaddTabRequested as ActionEvent |
Emitted when the optional leading add-tab button is clicked. |
| public event | tabClosedtabClosed as TabEvent |
Emitted after a closeable tab has been removed. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | addTab | Adds a tab. |
| public override | applyLayoutapplyLayout(recursive as Boolean = true) as Void: |
No summary. |
| public | closeTab | Closes a closeable tab by index. |
| public | findTab | Returns the index of a tab by title, or -1 when absent. |
| public | isModifiedAt | Reports whether the tab displays its modified-document badge. |
| public | onTabClosedonTabClosed(widget as Widget) as Void: |
Hook called after a closeable tab has been removed. |
| public | onTabSelectedonTabSelected(widget as Widget) as Void: |
Hook called after a tab becomes active. |
| public override | paintpaint(painter as Painter) as Void: |
No summary. |
| public | select | Selects a tab by index. |
| public override | setBounds | No summary. |
| public | setModifiedAt | Shows or hides the modified-document badge for a tab. |
| public | setTitleAt | Updates a tab title without replacing its widget. |
| public | titleAt | Returns the tab title at index. |
| public | widgetAt | Returns the hosted widget at index, or null when out of range. |