Widget Reference¶
pgwidgets provides a comprehensive set of widgets organized into the following categories.
Every visual widget inherits from Widget, which provides common methods
for sizing, visibility, fonts, borders, cursors, and tooltips. Every object
(visual or not) inherits from Callback, which provides the event system.
Common Widget Methods¶
All visual widgets support these methods from the Widget base class:
Method |
Description |
|---|---|
|
Set widget size in pixels |
|
Return current |
|
Set minimum size in pixels. Pass |
|
Set maximum size in pixels. Pass |
|
Declare that this widget should expand into available space
along the given axis/axes (analogous to Qt’s
|
|
Show or hide the widget |
|
Return visibility state |
|
Enable or disable the widget |
|
Set or get tooltip text |
|
Set font properties |
|
Set border width in pixels |
|
Set border color |
|
Set internal padding |
|
Give keyboard focus to this widget |
|
Allow or disallow browser text-select (drag-to-highlight)
inside this widget. Off by default for most widgets.
Form controls ( |
|
Register a custom cursor |
|
Activate a registered cursor |
|
Return the underlying DOM element |
|
Remove the widget and clean up |
Container widgets additionally support get_children().