TabPanel
Astryx tab list with one child panel shown per tab.
Children can be passed as a list or as a keyed mapping. Mapping keys become
stable child keys and default tab titles. Use select_key or
selected_index to choose the active tab. A child panel mounts the first
time its tab is selected and stays mounted, hidden, afterwards.
Attributes
attributeselected_index= t.Int(0).tag(sync=True)Functions
constructor__init__(children=None, *, titles=None, keys=None, selected_index=0, size=None, layout=None, divider=None, gap=2, width=None, height=None, **props) -> NoneparamchildrenChildInput= NoneChild widgets or owner objects exposing a widget attribute. Mapping
keys become stable child keys.
paramtitlesTitleInput= NoneTab titles associated with children. Defaults to the child keys.
paramkeysIterable[str] | None= NoneStable child keys for iterable children.
paramselected_indexint= 0Initially selected tab index.
paramsizestr | None= NoneTab size, "sm", "md", or "lg".
paramlayoutstr | None= None"hug" or "fill" tab layout.
paramdividerbool | None= NoneWhether to show the tab-list divider.
paramgapint | float= 2Astryx spacing step between the tab list and the panel.
paramwidthint | float | str | None= NonePanel width.
paramheightint | float | str | None= NonePanel height.
parampropsAny= {}Returns
Nonefuncselect(index) -> NoneSelect the tab at index.
paramindexintReturns
Nonefuncadd_tab(widget, title=None, *, key=None, select=False) -> NoneAppend a child as a new tab.
paramwidgetobjectparamtitlestr | None= Noneparamkeystr | None= Noneparamselectbool= FalseReturns
None