slint/docs/reference/src/language/widgets/tabwidget.md
Olivier Goffart e6d15576a3
Docs: remove non-existing properties in TabWidget (#3998)
These were added by commit eec9d31809 but
they are compiler internal properties that are not available to users,
or just don't exist

Discussed in https://github.com/slint-ui/slint/discussions/3995
2023-11-24 08:56:01 +01:00

800 B

TabWidget

TabWidget is a container for a set of tabs. It can only have Tab elements as children and only one tab will be visible at a time.

Properties

  • current-index (in int): The index of the currently visible tab

Properties of the Tab element

  • title (in string): The text written on the tab

Example

import { TabWidget } from "std-widgets.slint";
export component Example inherits Window {
    width: 200px;
    height: 200px;
    TabWidget {
        Tab {
            title: "First";
            Rectangle { background: orange; }
        }
        Tab {
            title: "Second";
            Rectangle { background: pink; }
        }
    }
}