- George Harrison
ToggleButton
ToggleButton Methods
ToggleButton() | Constructor for the ToggleButton class |
IsChecked() | Returns true if the toggle button is in a "checked" state. |
Check() | Sets the check state of the toggle button |
Derived Classes
None
See Also
Class Hierarchy, Frame, ChildFrame, Dialog, PushButton, ButtonClickEvent
public method ToggleButton(Window Parent, int XPos, int YPos, int Width, int Height, string Label, BitMap ButtonIcon = null, bool RadioFlag = false, bool PushLike = false)
Parameters
XParent
Parent window for the button control
Pos
One based X position of control relative to parent
YPos
One based Y position of control relative to parent
Width
Initial width of the control in pixels
Height
Initial height of the control in pixels
Label
String to be used for the Button control
ButtonIcon
Bitmap to embed in the button (or null)
RadioFlag
Radio flag to determine toggle dependence/independence
PushLike
Controls appearance of the button
Return Value
None
Description
Constructor for the ToggleButton class. The toggle button maintains an on/off check state and supports a "radio flag". If the radio flag is false, the button's "check state" is clicked on and off independently of other buttons. If the radio flag is true, clicking the button's check state affects other radio buttons at the same level (same parent). Only one radio button can be on at a time, so when one is clicked on, all others are checked off.
ToggleButton Class
public method<bool> IsChecked()
Parameters
None
Return Value
True if the toggle state is checked
Description
This method returns true if the current state is checked and false if the state is unchecked.
ToggleButton Class
public method<bool> Check(bool CheckState = true)
Parameters
CheckState
True if state will be checked, false if unchecked
Return Value
The previous check state
Description
This method sets the current check state for the toggle button. If the button is part of a radio group (radio flag is true), the check state of all others in the group will be turned off.
ToggleButton Class