TabBar
The TabBar displays a list of tab items and is used for tab based navigation.
Properties
enabled(in bool): If set tofalsethe combo box is disabled.model(in [TabBarItem]): The list of possible values.current_index(in_out int): The index of the selected value. (default: -1)style(in TabBarStyle): Defines the style of the combo box.
Callbacks
selected(/* index */ int): A value was selected from the combo box. The argument is the currently selected value.close(/* index */ int): If called it indicates the the item on the given index should be closed.
Example
import { TabBar } from "@vivi/magic.slint";
export component Example inherits Window {
MagicVerticalBox {
TabBar {
model: [
{ text: "Tab 1" },
{ text: "Tab 2" }
];
}
}
}