Export (0) Print
Expand All

Visual Basic Reference

Visual Studio 6.0

ComboBox Control

See Also    Example    Properties    Methods    Events

A ComboBox control combines the features of a TextBox control and a ListBox controlusers can enter information in the text box portion or select an item from the list box portion of the control.




To add or delete items in a ComboBox control, use the AddItem or RemoveItem method. Set the List, ListCount, and ListIndex properties to enable a user to access items in the ComboBox. Alternatively, you can add items to the list by using the List property at design time.

Note   A Scroll event will occur in a ComboBox control only when the contents of the dropdown portion of the ComboBox are scrolled, not each time the contents of the ComboBox change. For example, if the dropdown portion of a ComboBox contains five items and the top item is highlighted, a Scroll event will not occur until you press the down arrow six times (or the PGDN key once). After that, a Scroll event occurs for each press of the down arrow key. However, if you then press the up arrow key, a Scroll event will not occur until you press the up arrow key six times (or the PGUP key once). After that, each up arrow key press will result in a Scroll event.

© 2014 Microsoft