ButtonBase (hwx.gui)#

class ButtonBase#

Bases: Widget

Abstract base class for all buttons.

Attribute Table#

Name

Type

accel

property

autoRepeat

property

checkable

property

checked

property

command

property

dialog

property

flat

property

icon

property

text

property

Method Table#

Name

Description

onCommand (self, event=None)

setProperties (self, kwds)

Ensure proper order of setting properties.

setProperties(kwds)#

Ensure proper order of setting properties.

Parameters:

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.

property text#

Text to display.

property icon#

Icon file name.

property accel#

Keyboard accelerator to execute the command (ie ‘Ctrl-r’).

property flat#

Returns and sets if button has a flat borderless appearance.

property checkable#

Returns and sets if button can be toggled/checked (depending on rendering)

property checked#

Returns and sets if button has been toggled/checked. Only works if it is checkable.

property autoRepeat#

Returns and sets if button will auto-repeat if the user holds it down.

property command#

Method called when the button is clicked.

property dialog#

(type[ActionDialog]) Dialog toggled by button.

The dialog is accessed/created through its cls.get() classmethod.