TabWidget
classin packageklyn.gui.windows
public class TabWidget extends Container:
└ TabWidget

Closable tab container.

tabs = TabWidget()
tabs.addTab("Welcome", Label("Ready"), false)
tabs.addTab("Query.sql", editor, true)
Attributes inherited from Widget: keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Properties
Modifier and Type Member Description
public readonly property activeIndex
activeIndex as Int:
Index of the currently visible tab.
public property closeAreaWidth
closeAreaWidth as Int = 40
Area reserved at the right of a closeable tab for its close button.
public property tabHeight
tabHeight as Int = 38
Tab header height in pixels.
Properties inherited from Container: autoRelayout, layout, padding, size
Properties inherited 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
Constructors
Modifier and Type Member Description
public TabWidget Creates an empty tab widget.
Methods
Modifier and Type Member Description
public addTab
addTab(title as String, widget as Widget, closeable as Boolean = true) as Void:
Adds a tab.
public override applyLayout
applyLayout(recursive as Boolean = true) as Void:
No summary.
public closeTab
closeTab(index as Int) as Boolean:
Closes a closeable tab by index.
public findTab
findTab(title as String) as Int:
Returns the index of a tab by title, or -1 when absent.
public override paint
paint(painter as Painter) as Void:
No summary.
public select
select(index as Int) as Boolean:
Selects a tab by index.
public override setBounds
setBounds(x as Int, y as Int, width as Int, height as Int) as Void:
No summary.
Methods inherited from Container: add, applyLayout, attachWindow, children, clear, paintOverlay, remove, withLayout
Methods inherited from Widget: blur, containsPoint, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintOverlay, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds
Operators inherited from Container: operator[](index as Int) as Widget:, operator[](index as UInt) as Widget: