GetListControl

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


The GetListControl method returns an object of the ListControl class that is assigned to the list view with the specified ID. The ListControl class (see ListControl Class) provides methods to query and manipulate list views.

Arguments:

The arguments are:

id

The ID of the list view.

category

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

Return value:

An object of the ListControl class or .Nil if the requested list view does not exist.

Example:

The following example initializes list view 101 by sending message ADD to object lc, which is assigned to 101 by using GetListControl:

::class MyDlgClass subclass UserDialog inherit AdvancedControls

::method InitDialog
  lc = self~GetListControl(101)
  if lc == .Nil then return
  lc~~Add(101222)~~Add(,"Smith")~~Add(, ,"John")
  lc~~Add(101223)~~Add(,"Michael")~~Add(, ,"Carl")

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