Setting value to ComboBox Control

  • Thread starter Thread starter Marcel K.
  • Start date Start date
M

Marcel K.

When show value in combobox based on keyboard navigation -
the control shows a value, but does not actually contain
one until I click in the combo box. What I wanted to do
was be able to navigate with keyboard and if user hit the
enter key (keycode 13 on keydown event), Then I can call
change event that responds to value selected. Problem is
that unless they click the value the control doesn't
contain any value. Should I call the click event? Will
that take the value that is shown in the control that was
arrived at by keyboard navigation, not click/mouse
navigation?

Thanks

Marcel K.
 
Marcel said:
When show value in combobox based on keyboard navigation -
the control shows a value, but does not actually contain
one until I click in the combo box. What I wanted to do
was be able to navigate with keyboard and if user hit the
enter key (keycode 13 on keydown event), Then I can call
change event that responds to value selected. Problem is
that unless they click the value the control doesn't
contain any value. Should I call the click event? Will
that take the value that is shown in the control that was
arrived at by keyboard navigation, not click/mouse
navigation?

You're not trying to use the Change event are you? The
Enter key should fire the Click event.

The normal way to do what you want is to use either the
Click or AfterUpdate event.
 
Back
Top