ButtonBase (hwx.gui)¶
Abstract base class for all buttons.
- Inherits:
Public Methods¶
destroy (self) enableGlobalActions (self, enable) getMousePosition (self) getRelativeMousePosition (self) hide (self) saveAsPng (self, fname) setF1HelpTopic (self, helptopic) setProperties (self, kwds) show (self)
Property Details¶
Keyboard accelerator to execute the command (ie ‘Ctrl-r’).
Returns and sets if button will auto-repeat if the user holds it down.
Returns and sets if button can be toggled/checked (depending on rendering)
Returns and sets if button has been toggled/checked. Only works if it is checkable.
Returns and sets if button has a flat borderless appearance.
Icon file name.
Text to display.
Method Details¶
-
destroy(self)
Deletes this and all its children.
-
enableGlobalActions(self, enable)¶
Sets the state of Global Actions.
Disable the global actions to get key events.
| param enable: | Determines whether to enable or disable global actions. |
|---|---|
| type enable: | bool |
-
getMousePosition(self)¶
Returns the mouse position.
-
getRelativeMousePosition(self)¶
Returns the mouse position relative to this widget.
-
hide(self)
Hides the widget.
-
saveAsPng(self, fname)¶
Saves the widget as a .png file.
| param fname: | The file name for the .png |
|---|---|
| type fname: | str |
| returns: | True if it was saved succesfully, False otherwise. |
| rtype: | bool |
-
setF1HelpTopic(self, helptopic)¶
Popup web-browser helps when the user hits F1 when over this.
| param helptopic: | |
|---|---|
| Topic name user needs help in. | |
| type helptopic: | str |
-
setProperties(self, kwds)¶
Ensure proper order of setting properties.
| param kwds: | A dict so the order of the properties are set is unpredictable checkable must be set before checked, or checked will not take effect. |
|---|
-
show(self)
Shows the widget.