TextArea
Last updated
Last updated
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.
value
str
Widgets text value
placeholder
str
Specifies a short hint that describes the expected value of a text area
rows
int
Specifies the visible number of lines in a text area
autosize
bool
Specifies that a text area should automatically get focus
readonly
bool
Specifies that a text area should be read-only
widget_id
str
ID of the widget
Widgets text value
type: str
default value: None
Specifies a short hint that describes the expected value of a text area.
type: str
default value: "Please input"
Specifies the visible number of lines in a text area.
type: int
default value: 2
Specifies that a text area should automatically get focus.
type: bool
default value: True
Specifies that a text area should be read-only.
type: bool
default value: false
ID of the widget.
type: str
default value: None
set_value(value: str)
Set value data.
get_value()
Returns input value data.
is_readonly()
Check TextArea
is readonly
or not.
enable_readonly()
Set readonly
== True
.
disable_readonly()
Set readonly
== False
.
You can find this example in our Github repository:
ui-widgets-demos/text elements/002_textarea/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Button
widgets we will useTextArea
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.
Add functions to control widgets from python code