TextArea
Introduction
TextArea
widget in Supervisely is a widget that allows users to enter and edit multiple lines of text. The widget provides a large text input area that can be customized with various options, such as placeholder text, autosize or read-only properties, and default value. TextArea
widget is often used for collecting longer form input from users, such as descriptions or comments.
Function signature
Parameters
Parameters | Type | Description |
---|---|---|
|
| Widgets text value |
|
| Specifies a short hint that describes the expected value of a text area |
|
| Specifies the visible number of lines in a text area |
|
| Specifies that a text area should automatically get focus |
|
| Specifies that a text area should be read-only |
|
| ID of the widget |
value
Widgets text value
type: str
default value: None
placeholder
Specifies a short hint that describes the expected value of a text area.
type: str
default value: "Please input"
rows
Specifies the visible number of lines in a text area.
type: int
default value: 2
autosize
Specifies that a text area should automatically get focus.
type: bool
default value: True
readonly
Specifies that a text area should be read-only.
type: bool
default value: false
widget_id
ID of the widget.
type: str
default value: None
Methods and attributes
Attributes and Methods | Description |
---|---|
| Set value data. |
| Returns input value data. |
| Check |
| Set |
| Set |
Mini App Example
You can find this example in our Github repository:
ui-widgets-demos/text elements/002_textarea/src/main.py
Import libraries
Init API client
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Initialize Button
widgets we will use
Button
widgets we will useInitialize TextArea
widget
TextArea
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