The ButtonControl class provides methods to query and modify push button controls. It inherits all methods of the DialogControl class (see DialogControl Class).
Use the GetButtonControl method (see GetButtonControl) to retrieve an object of the ButtonControl class.
The ButtonControl class requires the class definition file oodwin32.cls:
::requires "oodwin32.cls"
Instances of the ButtonControl class implement the methods listed in the ButtonControl Instance Methods table.
Table 18-1. ButtonControl Instance Methods
Method... | ...on page |
---|---|
ChangeBitmap | ChangeBitmap |
DimBitmap | DimBitmap |
DisplaceBitmap | DisplaceBitmap |
DrawBitmap | DrawBitmap |
GetBitmapSizeX | GetBitmapSizeX |
GetBitmapSizeY | GetBitmapSizeY |
GetBmpDisplacement | GetBmpDisplacement |
Scroll | Scroll |
ScrollBitmapFromTo | ScrollBitmapFromTo |
ScrollText | ScrollText |
State | State |
State= | State= |
Style= | Style= |
>>-aButtonControl~State----------------------------------------><
The State method retrieves the current state of the associated button control.
A text string that can contain one or more of the following keywords, separated by blanks:
The radio button or the check box is checked. A radio button is checked when it contains a black dot, a check box is checked when it contains a check mark.
The radio button or the check box is not checked. A radio button is not checked when it does not contain a black dot and a check box is not checked when it does not contain a check mark.
A 3-state check box button is neither checked nor unchecked. Only 3-state check box buttons can be in this state. When in the indeterminate state, the check box button is drawn in a visually distinctive manner that is different from checked or unchecked. Exactly how the indeterminate state is drawn is dependent on the operating system version.
When a button is in the pushed state it is drawn as a sunken button, otherwise it is drawn as a raised button. The user causes a button to be in the pushed state by clicking the button with the left mouse button. As long as the mouse button is held down, the button will be drawn as pushed. When the user releases the mouse button, the button will resume its not pushed state. When this keyword is not in the text string, the button is not in the pushed state.
The button has the keyboard focus. When this keyword is missing from the text string, the button does not have the focus.
button = MyDialog~GetButtonControl("IDOK") if button == .Nil then return say button~State
The result could be "UNCHECKED FOCUS".