TabWidget
classin packageklyn.gui.windows
public class TabWidget extends Container:
tabs = TabWidget()
tabs.addTab("Welcome", Label("Ready"), false)
tabs.addTab("Query.sql", editor, true)
Properties
| Modifier and Type |
Member |
Description |
| public readonly property |
activeIndex |
Index of the currently visible tab. |
| public readonly property |
activeTitle |
Title of the selected tab. |
| public readonly property |
activeWidget |
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 property |
closeAreaWidthcloseAreaWidth as Int = 30 |
Area reserved at the right of a closeable tab for its close button. |
| public property |
showAddButton |
Whether a leading + button is displayed before the tab list. |
| public property |
showTabBar |
Whether the tab strip is visible above the active page. |
| public readonly property |
size |
Number of tabs. |
| public property |
tabHeight |
Tab header height in pixels. |
Inherited Properties
propertyInherited Properties from Widget: accentColor,
backgroundColor,
borderColor,
bottom,
canFocus,
cornerRadius,
font,
foregroundColor,
hasFocus,
height,
isEnabled,
isHovered,
isManaged,
isTabStop,
isVisible,
layoutParams,
margin,
maxHeight,
maxWidth,
minHeight,
minWidth,
parent,
preferredHeight,
preferredWidth,
right,
sizePolicy,
styleClass,
width,
window,
x,
y
Events
| Modifier and Type |
Member |
Description |
| public event |
addTabRequested |
Emitted when the optional leading add-tab button is clicked. |
Inherited Events
Constructors
| Modifier and Type |
Member |
Description |
| public |
TabWidget |
Creates an empty tab widget. |
Methods
| 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 |
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 |
paint |
No summary. |
| public |
select |
Selects a tab by index. |
| public override |
setBoundssetBounds(x as Int, y as Int, width as Int, height as Int) as Void: |
No summary. |
| 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. |
Inherited Methods
methodInherited Methods from Widget: blur,
containsPoint,
emitKeyPressed,
emitKeyReleased,
emitMouseMoved,
emitMousePressed,
emitMouseReleased,
emitMouseWheel,
handleTabKey,
notifyPaintRequested,
paint,
paintOverlay,
repaint,
requestFocus,
resolvePreferredHeight,
resolvePreferredWidth,
resolvedFont,
setBounds
Inherited Operators