GetComboBox

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


The GetComboBox method returns an object of the ComboBox class that is assigned to the list box with the specified ID. The ComboBox class (see ComboBox Class) provides methods to query and manipulate combo boxes.

Arguments:

The arguments are:

id

The ID of the combo box.

category

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

Return value:

An object of the ComboBox class or .Nil if the requested combo box does not exist.

Example:

The following example removes all entries of combo box AREAS and adds several new entries. Entry "City" will be preselected. Object "di" is connected to combo box AREAS.

::class MyDlgClass subclass UserDialog inherit AdvancedControls

::method UpdateList
  di = self~GetComboBox("AREAS")
  if di == .Nil then return 0
  di~DeleteAll
  di~Add("Town")
  di~Add("City")
  di~Add("Green")
  di~Add("Forest")
  di~Select("City")

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