| Class | Fox::FXCheckButton |
| In: |
rdoc-sources/FXCheckButton.rb
lib/fox16/core.rb |
| Parent: | FXLabel |
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. The option CHECKBUTTON_AUTOGRAY (CHECKBUTTON_AUTOHIDE) causes the button to be grayed out (hidden) if its handler does not respond to the SEL_UPDATE message. With the CHECKBUTTON_PLUS option, the Check Button will draw a + or - sign instead of a check. You can use this to make collapsible panels, by hooking up a Check Button to a layout manager via the ID_TOGGLE_SHOWN message. This will give a similar visual element as collapsing folders in a Tree List.
The following messages are sent by FXCheckButton to its target:
| SEL_KEYPRESS: | sent when a key goes down; the message data is an FXEvent instance. |
| SEL_KEYRELEASE: | sent when a key goes up; the message data is an FXEvent instance. |
| SEL_LEFTBUTTONPRESS: | sent when the left mouse button goes down; the message data is an FXEvent instance. |
| SEL_LEFTBUTTONRELEASE: | sent when the left mouse button goes up; the message data is an FXEvent instance. |
| SEL_COMMAND: | sent when the button is clicked. |
| CHECKBUTTON_AUTOGRAY: | Automatically gray out when not updated |
| CHECKBUTTON_AUTOHIDE: | Automatically hide when not updated |
| CHECKBUTTON_PLUS: | Draw a plus sign for unchecked and minus sign for checked |
| CHECKBUTTON_NORMAL: | JUSTIFY_NORMAL|ICON_BEFORE_TEXT |
| boxColor | [RW] | Box background color [FXColor] |
| checkButtonStyle | [RW] | Check button style [Integer] |
| checkColor | [RW] | Box check color [FXColor] |
| checkState | [RW] | Check button state (TRUE, FALSE or MAYBE) [Integer] |
Construct new check button