+-------------------+ V | >>-aButtonControl~State=--"----+-CHECKED-------+-+--"---------->< +-UNCHECKED-----+ +-INDETERMINATE-+ +-PUSHED--------+ +-NOTPUSHED-----+ +-FOCUS---------+
The State= method sets the state for the associated button control.
The only argument is:
A text string that contains one or more of the following keywords, separated by a blank:
The radio button or the check box is to be set to the "checked" state.
The radio button or the check box is to be set to the "unchecked" state.
The 3-state check box button is to be set to the "indeterminate" state. This state can only be applied to 3-state check box buttons.
The button is to be set to the "pushed" state.
The "pushed" state is to be removed from the button.
The button is to be set to the "focused" state.
button = MyDialog~GetButtonControl("IDOK") if button == .Nil then return button~State="FOCUS PUSHED"
Some points to remember when using this method.
A button can be set to only one of the checked, unchecked or indeterminate states. If more than one of these states is specified in the text string the button is set to the state that is first in the string.
Only 3-state check box buttons can be set to the indeterminate state. If this keyword is used for a button that is not a 3-state button then the button's state is not changed.
To change a button state to not focused programmatically use one of the ooDialog methods that move the focus: TabToNext, TabToPrevious, SetFocus, FocusItem, etc..