State=

                             +-------------------+
                             V                   |
>>-aButtonControl~State=--"----+-CHECKED-------+-+--"----------><
                               +-UNCHECKED-----+
                               +-INDETERMINATE-+
                               +-PUSHED--------+
                               +-NOTPUSHED-----+
                               +-FOCUS---------+


The State= method sets the state for the associated button control.

Arguments:

The only argument is:

new_State

A text string that contains one or more of the following keywords, separated by a blank:

CHECKED

The radio button or the check box is to be set to the "checked" state.

UNCHECKED

The radio button or the check box is to be set to the "unchecked" state.

INDETERMINATE

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.

PUSHED

The button is to be set to the "pushed" state.

NOTPUSHED

The "pushed" state is to be removed from the button.

FOCUS

The button is to be set to the "focused" state.

Example:

button = MyDialog~GetButtonControl("IDOK")
if button == .Nil then return
button~State="FOCUS PUSHED"

Notes:

Some points to remember when using this method.

  1. 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.

  2. 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.

  3. To change a button state to not focused programmatically use one of the ooDialog methods that move the focus: TabToNext, TabToPrevious, SetFocus, FocusItem, etc..