Dialog
Last updated
Last updated
Dialog
is a widget that allows to show a dialog window that contain any other widgets. It can be used to show a message to the user or to ask for confirmation.
Read this tutorial in developer portal.
Title of the dialog window that will be displayed in the header.
type: str
default value: ""
Widget to display in the dialog window. Use Container
widget to display multiple widgets.
type: Widget
default value: None
Width of the annotation border (contour) line. Set to 0 to hide a line.
type: Literal["tiny", "small", "large", "full"]
default value: "small"
ID of the widget.
type: str
default value: None
You can find this example in our Github repository: supervisely-ecosystem/ui-widgets-demos/layouts and containers/016_dialog/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Prepare a layout for app using Card
widget with the content
parameter and place Button for opening dialog to the content.
Add Container widget with card and dialog widgets to the app layout.
Parameters | Type | Description |
---|---|---|
Attributes and Methods | Description |
---|---|
title
str
Title of the dialog window
content
Widget
Widget to display in dialog window
size
Literal["tiny", "small", "large", "full"] = "small"
Size of the dialog window
widget_id
str
ID of the widget
show()
Open (show) dialog window.
hide()
Close (hide) dialog window.
title
Set title for dialog window