GetCheckControl

>>-anAdvancedControl~GetCheckControl(--id--+-------------+--)--><
                                           +-,--category-+


The GetCheckControl method returns an object of the CheckBox class that is assigned to the check box with the specified ID. The CheckBox class (see CheckBox Class) provides methods to query and manipulate check boxes.

Arguments:

The arguments are:

id

The ID of the check box.

category

The number of the category dialog page containing the requested check box. This argument must only be specified for category dialogs.

Return value:

An object of the CheckBox class or .Nil if the requested check box does not exist.

Example:

The following example displays a message when check box CHOICE1 is checked:

::class MyDlgClass subclass UserDialog inherit AdvancedControls

::method CurrentState
  di = self~GetCheckControl("CHOICE1")
  if di == .Nil then return 0
  if di~checked then say "The check box is checked!"

Note: GetCheckControl connects an Object Rexx object with a Windows object. If the object does not exist, the Nil object is returned. Therefore, this method can only be applied after the Windows dialog has been created (after the invocation of StartIt).