The ListBox class provides methods to query and modify list box controls. It inherits all methods of the DialogControl class (see page DialogControl Class).
Use the GetListBox method (see page GetListBox) to retrieve an object of the ListBox class.
The ListBox class requires the class definition file oodwin32.cls:
::requires "oodwin32.cls"
Instances of the ListBox class implement the methods listed in the ListBox Instance Methods table.
Table 21-1. ListBox Instance Methods
Method... | ...on page |
---|---|
Add | Add |
AddDirectory | AddDirectory |
ColumnWidth | ColumnWidth |
Delete | Delete |
DeleteAll | DeleteAll |
DeSelectIndex | DeSelectIndex |
DeselectRange | DeselectRange |
Find | Find |
GetFirstVisible | GetFirstVisible |
GetText | GetText |
Insert | Insert |
ItemHeight | ItemHeight |
ItemHeight= | ItemHeight= |
Items | Items |
MakeFirstVisible | MakeFirstVisible |
Modify | Modify |
Select | Select |
Selected | Selected |
SelectedIndex | SelectedIndex |
SelectedIndexes | SelectedIndexes |
SelectedItems | SelectedItems |
SelectIndex | SelectIndex |
SelectRange | SelectRange |
SetTabulators | SetTabulators |
SetWidth | SetWidth |
Width | Width |
>>-aListBox~Add(--listEntry--)---------------------------------><
The Add method adds a new item to the list. If the list is not sorted, the new item is added to the end of the list.
The only argument is:
A text string added to the list.
A one-based index that specifies the position at which the entry has been added, or 0 or a value less than 0 to indicate an error.