RadioTabs
Last updated
Last updated
RadioTabs
is a graphical user interface tool in Supervisely that allows users to group related widgets into tabs and switch between them using radio buttons. This feature is particularly useful for organizing and presenting complex interfaces with multiple settings and options. RadioTabs
offers a simple and intuitive interface for users to quickly navigate between different tabs and access the desired widgets.
Determine list of the tabs titles.
type: List[str]
Determine list of the tabs content.
type: List[Widget]
Determine list of tabs descriptions.
type: List[str]
default value: None
ID of the widget.
type: str
default value: None
You can find this example in our Github repository:
ui-widgets-demos/layouts and containers/011_radio_tabs/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
RadioTabs
widgetsText
widget to change text on widgetPrepare a layout for app using Card
widget with the content
parameter and place widget that we've just created in the Container
widget.
Create an app object with layout parameter.
Parameters | Type | Description |
---|---|---|
Attributes and Methods | Description |
---|---|
titles
List[str]
List of the tabs titles
contents
List[Widget]
List of tabs content
descriptions
List[str]
List of tabs descriptions
widget_id
str
ID of the widget
set_active_tab(value: str)
Set active tab by title.
get_active_tab()
Return active tab title.
@value_changed
Decorator function handled when RadioTabs
value is changed.