GetEditControl

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


The GetEditControl method returns an object of the EditControl class that is assigned to the entry line with the specified ID. The EditControl class (see EditControl Class) provides methods to query and manipulate edit controls.

Arguments:

The arguments are:

id

The ID of the edit control.

category

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

Return value:

An object of the StaticControl class or .Nil if the requested edit control does not exist.

Example:

The following example gets an object of the EditControl class and checks whether the NAME entry line is empty. If the name field is empty, the dialog is not valid.

::class MyDlgClass subclass UserDialog inherit AdvancedControls

::method Validate
  di = self~GetEditControl("NAME")
  if di == .Nil then return 0
  if di~Title~space(0) \="" then return 1

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