RadioTable
Introduction
RadioTable
widget in Supervisely is a user interface element that allows creating a table of options, each with a corresponding radio button. With RadioTable
widget, developer can define multiple rows of options, and only one row option can be selected. The RadioTable widget provides a convenient and intuitive way to navigate and make selections within the table.
Function signature
Parameters
Parameters | Type | Description |
---|---|---|
|
|
|
|
|
|
|
| Determine subtitles for columns |
|
| Determine format of output |
|
| ID of the widget |
columns
Determine RadioTable
columns names.
type: List[str]
rows
Determine RadioTable
rows content.
type: List[List[str]]
subtitles
Determine subtitles for columns.
type: Union[Dict[str, str], List]
default value: {}
column_formatters
Determine format of output RadioTable
.
type: Dict
default value: {}
widget_id
ID of the widget.
type: str
default value: None
Methods and attributes
Attributes and Methods | Description |
---|---|
| Get or set |
| Get or set |
| Get or set |
| Return column formatter function by given column name. |
| Return default column formatter. |
| Return selected row data. |
| Return selected row index. |
| Set table columns by given list of column names. |
| Set table data. |
| Set row selected by given index. If row with given index does not exist raise |
| Decorator function is handled when widget value is changed |
Mini App Example
You can find this example in our Github repository:
ui-widgets-demos/tables/003_radio_table/src/main.py
Import libraries
Init API client
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Initialize RadioTable
widget
RadioTable
widgetCreate additional widgets we will use in UI
Create 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 code
Last updated