Checkbox
Introduction
This widget is a simple and intuitive interface element that allows users to select given option. The Checkbox
widget can be customized with different label text and default state. By providing an easy and efficient way to make selections, the Checkbox
widget is an essential tool for any image or video annotation project.
Function signature
Parameters
content
Checkbox content.
type: Union[Widget, str]
checked
Whether Checkbox is checked. Return True
if checked.
type: bool
default value: False
widget_id
ID of the widget.
type: str
default value: None
Methods and attributes
Mini App Example
You can find this example in our Github repository:
ui-widgets-demos/controls/002_checkbox/src/main.py
Import libraries
Init API client
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Initialize Project ID
we will use
Project ID
we will useInitialize Checkbox
widget
Checkbox
widgetCreate more widgets
In this tutorial we will use SelectDataset
, Button
, NotificationBox
widgets to show how to control Checkbox
widget from python code.
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 widget from python code
Last updated