Class Fox::FXToggleButton |
|
The toggle button provides a two-state button, which toggles between the on and the off state each time it is pressed. For each state, the toggle button has a unique icon and text label.
The following messages are sent by FXToggleButton to its target:
SEL_COMMAND: | sent when the toggle button is pressed. |
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. |
TOGGLEBUTTON_AUTOGRAY: | Automatically gray out when not updated |
TOGGLEBUTTON_AUTOHIDE: | Automatically hide toggle button when not updated |
TOGGLEBUTTON_TOOLBAR: | Toolbar style toggle button [flat look] |
TOGGLEBUTTON_NORMAL: | FRAME_RAISED|FRAME_THICK|JUSTIFY_NORMAL|ICON_BEFORE_TEXT |
Methods |
Attributes |
altHelpText | [RW] | Alternate status line help text, shown when toggled [String] |
altIcon | [RW] | Alternate icon, shown when toggled [FXIcon] |
altText | [RW] | Alternate text, shown when toggled [String] |
altTipText | [RW] | Alternate tool tip message, shown when toggled [String] |
state | [RW] | Toggled state [true or false] |
toggleStyle | [RW] | Toggle button style [Integer] |
Public Class methods |
new(p, text1, text2, icon1=nil, icon2=nil, tgt=nil, sel=0, opts=TOGGLEBUTTON_NORMAL, x=0, y=0, w=0, h=0, pl=DEFAULT_PAD, pr=DEFAULT_PAD, pt=DEFAULT_PAD, pb=DEFAULT_PAD) {|theToggleButton| ...} |
Construct toggle button with two text labels, and two icons, one for each state