Basics
Guides
API Reference
Basics
Guides
API Reference
[18:7] extends: FxObj
The Tab class wraps the JavaFX Tab, which represents a single selectable tab within a TabPane. Each Tab holds a label, an optional graphic icon, and a content node that is displayed in the TabPane body when that tab is selected. Tabs can be individually disabled or made non-closable regardless of the TabPane closing policy. Note that Tab does not extend Node or Region in JavaFX -- it is not part of the scene graph on its own. Its visual appearance is controlled entirely through the skin of the owning TabPane and the CSS sub-structure of that skin. Because of this, the standard Node/Region/Control CSS property hierarchy does not apply directly to Tab.
Tab (string Text = "")
Creates a new Tab with the specified label text.
Text is a string with the tab label.setText (string Text)
Sets the tab label text.
Text is a string with the label.this object for chaininggetText ()
Gets the tab label text.
A string with the label.setContent (object ContentObj)
Sets the content node displayed when this tab is selected.
ContentObj is a Node object to display.this object for chainingsetClosable (bool Closable)
Sets whether the tab can be closed by the user.
Closable is a bool with true to allow closing.this object for chainingsetGraphic (object Graphic)
Sets a graphic (icon) for the tab.
Graphic is a Node object to use as the graphic.this object for chainingsetDisable (bool Disable)
Sets whether the tab is disabled.
Disable is a bool with true to disable.this object for chaininggetContent ()
Returns the content node displayed when this tab is selected.
A Node with the current content, or null if none is set.isClosable ()
Returns whether the tab can be closed by the user.
A bool with true if the tab is closable.setId (string Id)
Sets the CSS id of this tab.
Id is a string with the CSS id.this object for chainingsetStyle (string Style)
Sets the inline CSS style string for this tab.
Style is a string with the CSS style rules.this object for chainingonClosed (callback OnClosed)
Sets a callback for when the tab is closed.
OnClosed is a callback to call on close.this object for chainingsetOnSelectionChanged (callback OnChanged)
Sets a callback that fires when this tab's selected state changes.
OnChanged is a callback to call on selection change.this object for chaining
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.