ComboBox

Object List Hierarchy Next Object

Definition:

A ComboBox combines the features of a text box and a list box so the user is always presented with an edit field and a list area. There are three styles of ComboBoxes available.

Icon: images/Phx00132.gif

Specialized Features:

The following tables list and describe the properties, methods, and events added by ComboBox. There are no added methods.


Properties Use to...


Ctrl3d Enable the 3-D effects for the Control.

DropHeight Control how tall the drop-down list of a ComboBox will be.

ItemHeight Determine the height of a single item. (Read only)

ListCount Specify the number of items in the list portion of the control.

ListIndex Return the index number of the currently selected item in a control.

SelLength Set or return the number of characters selected in the text box portion of the designated ComboBox control.

SelStart Set or return the starting point of text selected in the text box portion of the designated ComboBox.

SelText Replace or return the string containing the currently selected text.

Sorted Determine whether the elements of a ComboBox are sorted alphabetically by Phoenix.

Style Set the type of ComboBox to display. There are three types available.

Text Determine the selected item in the list box for ComboBoxes with a Style value of 2 - DropDown List.


Methods Use to...


AddItem Add a new item to a ComboBox.

Clear Clear the contents of a ComboBox.

FindString Locate the requested string prefix in the ComboBox.

InsertItem Insert a new item at a given index.

ItemIndex Find the index of a given string.

List Find the string at a given index.

RemoveItem Remove a specified item from a ComboBox.

TextUnload Appends to 'cmds' any statements necessary to regenerate the object from text. It is used by the Text-based object saving mechanism that is used by the write module (as text) functions.


Events Use to...


Change Indicate that the contents of a control have changed and initiate some action.

DropDown Indicate when the list portion of a ComboBox is about to drop down to display the list.

Copied Features:

images/Phx00133.gif Properties images/Phx00134.gif Methods images/Phx00135.gif Events

Details:

You can enter text and select list items in a ComboBox using the standard Windows techniques. For example, to select an item in a list simply click on it.

There are three types of ComboBoxes available: the drop-down combo, the simple combo, and the drop-down list box. You can set the type using the Style property. All three styles share some similarities and differences. The drop-down list and the drop-down combo are similar in that the list area is not displayed until the user clicks on the down arrow at the end of the text box. The difference is that a user can edit text in a drop-down combo text box, but cannot edit text in a drop-down list. The simple combo, like the drop-down combo, allows editing in the text box. The list area, however, is always displayed.

Phoenix automatically adds a vertical scroll bar on the right of the list box if the entire list cannot be displayed at one time.