Difference between revisions of "ComboBox Control in VB6"
(New page: A ComboBox control combines the features of a TextBox control and a ListBox control. Users can enter information in the text box portion or select an item from the list box portion of the...) |
|||
Line 6: | Line 6: | ||
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. | 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. | ||
+ | |||
+ | == Properties == | ||
+ | |||
+ | === AddItem === | ||
+ | |||
+ | === RemoveItem === | ||
+ | |||
+ | === ListCount === | ||
+ | |||
+ | === ListIndex === | ||
| |
Revision as of 12:35, 10 January 2008
A ComboBox control combines the features of a TextBox control and a ListBox control.
Users 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.
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.
Properties
AddItem
RemoveItem
ListCount
ListIndex