Widget basics
All widgets work the same, generally:
- You can create or define an instance of a widget.
- You can preset the attributes of a widget, such as its initial value, or a label to be displayed.
- Widgets can react to different inputs from a user. The inputs are gathered by a handler or Python function that is invoked when a user performs some action on a widget, for example, to call the handler if the user clicks on a button.
- The value of a widget can be used later in your script just as any other variable. For example, you can use a widget to determine how many circles to draw.
Â