RadioTabs
Introduction
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.
Function signature
Parameters
Parameters | Type | Description |
---|---|---|
|
| List of the tabs titles |
|
| List of tabs content |
|
| List of tabs descriptions |
|
| ID of the widget |
titles
Determine list of the tabs titles.
type: List[str]
contents
Determine list of the tabs content.
type: List[Widget]
descriptions
Determine list of tabs descriptions.
type: List[str]
default value: None
widget_id
ID of the widget.
type: str
default value: None
Methods and attributes
Attributes and Methods | Description |
---|---|
| Set active tab by title. |
| Return active tab title. |
| Decorator function handled when |
Mini App Example
You can find this example in our Github repository:
ui-widgets-demos/layouts and containers/011_radio_tabs/src/main.py
Import libraries
Init API client
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Initialize RadioTabs
widgets
RadioTabs
widgetsInitialize Text
widget to change text on widget
Text
widget to change text on widgetCreate app layout
Prepare a layout for app using Card
widget with the content
parameter and place widget that we've just created in the Container
widget.
Create app using layout
Create an app object with layout parameter.
Add functions to control widgets from python code
Last updated