GetRadioControl

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


The GetRadioControl method returns an object of the RadioButton class that is assigned to the radio button with the specified ID. The RadioButton class (see RadioButton Class) provides methods to query and manipulate radio buttons.

Arguments:

The arguments are:

id

The ID of the radio button.

category

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

Return value:

An object of the RadioButton class or .Nil if the requested radio button does not exist.

Example:

The following example displays a message when radio button CHOICE1 is selected:

::class MyDlgClass subclass UserDialog inherit AdvancedControls

::method CurrentState
  di = self~GetRadioControl("CHOICE1")
  if di == .Nil then return 0
  if di~checked then say "The radio button is selected!"

Note: GetRadioControl 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).