Class | Fox::FXToggleButton |
In: |
rdoc-sources/FXToggleButton.rb
|
Parent: | FXLabel |
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_KEEPSTATE: | Draw button according to state |
TOGGLEBUTTON_NORMAL: | FRAME_RAISED|FRAME_THICK|JUSTIFY_NORMAL|ICON_BEFORE_TEXT |
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] |
Return an initialized FXToggleButton instance.
p: | the parent window for this toggle button [FXComposite] |
text1: | the text for this toggle button‘s first state [String] |
text2: | the text for this toggle button‘s second state [String] |
icon1: | the icon, if any, for this toggle button‘s first state [FXIcon] |
icon2: | the icon, if any, for this toggle button‘s second state [FXIcon] |
target: | the message target, if any, for this toggle button [FXObject] |
selector: | the message identifier for this toggle button [Integer] |
opts: | toggle button options [Integer] |
x: | initial x-position [Integer] |
y: | initial y-position [Integer] |
width: | initial width [Integer] |
height: | initial height [Integer] |
padLeft: | internal padding on the left side, in pixels [Integer] |
padRight: | internal padding on the right side, in pixels [Integer] |
padTop: | internal padding on the top side, in pixels [Integer] |
padBottom: | internal padding on the bottom side, in pixels [Integer] |