Tab
A tab of a TabView.
Example:
fluent.Tab(
"Document 1",
icon=fluent.FluentIcons.DOCUMENT,
content=ft.Text("Contents of document 1"),
on_close=close_tab,
)
Inherits: Control
Properties
contentinstance-attribute
content: ControlThe control shown below the tabs while this tab is selected.
iconclass-attributeinstance-attribute
icon: IconDataOrControl | None = NoneAn icon or control shown before text.
Events
on_closeclass-attributeinstance-attribute
on_close: ControlEventHandler[Tab] | None = NoneCalled when the user closes this tab, with its close button or with Ctrl+W (Cmd+W on macOS) while it is selected.
The tab has a close button only if this is set. The tab is not removed
automatically: remove it from TabView.tabs here.