>>-anAdvancedControl~GetButtonControl(--id--+-------------+--)->< +-,--category-+
The GetButtonControl method returns an object of the ButtonControl class that is assigned to the push button with the specified ID. The ButtonControl class (see ButtonControl Class) provides methods to query and manipulate push buttons.
The arguments are:
The ID of the push button.
The number of the category dialog page containing the requested push button. This argument must only be specified for category dialogs.
An object of the ButtonControl class or .Nil if the requested push button does not exist.
The following example displays the current state of the OK button by retrieving an object of the Button class and calling the State method:
::class MyDlgClass subclass UserDialog inherit AdvancedControls ::method CurrentState di = self~GetButtonControl(1) if di == .Nil then return 0 say "State is" di~State
Note: GetButtonControl 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).