Chapter 22. ComboBox Class

Table of Contents
Add
Insert
Delete
DeleteAll
Find
SelectedIndex
Selected
SelectIndex
Select
Items
GetText
Modify
AddDirectory
OpenDropDown
CloseDropDown
IsDropDownOpen
EditSelection

The ComboBox class provides methods to query and modify combo box controls. It inherits all methods of the DialogControl class (see DialogControl Class).

Use the GetComboBox method (see GetComboBox) to retrieve an object of the ComboBox class.

Requires:

The ComboBox class requires the class definition file oodwin32.cls:

::requires "oodwin32.cls"

Methods:

Instances of the ComboBox class implement the methods listed in the ComboBox Instance Methods table.

Table 22-1. ComboBox Instance Methods

Method......on page
AddAdd
AddDirectoryAddDirectory
CloseDropDownCloseDropDown
DeleteDelete
DeleteAllDeleteAll
EditSelectionEditSelection
FindFind
GetTextGetText
InsertInsert
IsDropDownOpenIsDropDownOpen
ItemsItems
ModifyModify
OpenDropDownOpenDropDown
SelectSelect
SelectIndexSelectIndex
SelectedSelected
SelectedIndexSelectedIndex

Add

>>-aComboBox~Add(--listEntry--)--------------------------------><


The Add method adds a new item to the list of the combo box. If the list is not sorted, the new item is added to the end of the list.

Arguments:

The only argument is:

listEntry

A text string added to the list.

Return value:

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.