FXCheckButton

A check button is a tri-state button. Normally, it is either True or False, and toggles between True or False whenever it is pressed. A third state MAYBE may be set to indicate that no selection has been made yet by the user, or that the state is ambiguous. When pressed, the check button sends a SEL_COMMAND to its target, and the message data represents the state of the check button.


FXCheckButton(p, text, tgt=None, sel=0, opts=CHECKBUTTON_NORMAL, x=0, y=0, w=0, h=0, pl=DEFAULT_PAD, pr=DEFAULT_PAD, pt=DEFAULT_PAD, pb=DEFAULT_PAD)

Construct new check button.

ArgumentTypeDefaultDescription
pFXComposite  
textString  
tgtFXObjectNone 
selInt0 
optsIntCHECKBUTTON_NORMAL 
xInt0 
yInt0 
wInt0 
hInt0 
plIntDEFAULT_PAD 
prIntDEFAULT_PAD 
ptIntDEFAULT_PAD 
pbIntDEFAULT_PAD 


canFocus()

Returns True because a check button can receive focus.

Reimplemented from FXWindow.


getCheck()

Get check button state (True, False or MAYBE).

Reimplemented in AFXCheckButton.


getDefaultHeight()

Get default height.

Reimplemented from FXLabel.


getDefaultWidth()

Get default width.

Reimplemented from FXLabel.


setCheck(state=True)

Set check button state (True, False or MAYBE).

ArgumentTypeDefaultDescription
stateBoolTrue 


Global flags

CheckButton styles

CHECKBUTTON_AUTOGRAY

Automatically gray out when not updated.

CHECKBUTTON_AUTOHIDE

Automatically hide when not updated.