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.


The arguments are:


The ID of the check box.


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.


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