Combo Box Control Events

These events can fire on the combo box control during runtime:

  • Selection Changed

  • Control is Entered

  • Control is Exited

Runtime fires the Selection Changed event when the user or application selects an item in the combo box list that is different from the item currently selected. In Microsoft Internet Explorer (IE), this selection can be made using any of these methods:

  • User selects an item with the mouse from the combo box's drop-down list.

    With the drop-down list displayed, the user can also type the first character of a matching item, or use the up and down arrow keys.

  • User places the focus on the combo box without activating its drop-down list and types the first character matching that of an item description in the combo box's list of items (type-ahead feature).

    If more than one item that matches this character exists, the user can cycle through all of the matching items by pressing the same character key multiple times. Each time a new item is selected, the Selection Changed event fires.

  • User places focus on the combo box without activating its drop-down list and then uses the up and down arrow keys to cycle through the combo box's item list until the desired item is found.

    Each time a new item is selected, the Selection Changed event fires.

  • Combo box is the target of an ER assignment statement and the value assigned to it is a valid key value matching one of the current item key values loaded in the control.

  • Combo box and a valid key value are passed into the combo box system function, Select Item.

In some explorers other than IE (such as Mozilla), the user might need to tab out of the combo box to trigger the Selection Changed event, particularly if the selection was made using the keyboard.

Of course, runtime fires Control is Entered when the user changes the focus to the check box by any of these means, and fires Control is Exited when the control loses focus.