1
votes

Ex: Combo box1:

Thanks Up and down arrow keys works when combo box has its focus. But how can i use characters to select items on combo box. Ex: Apple,Banana,Orange are the items on combo box and when i got focus on it and i press A key on keyboard Combo box item will display Apple.

Winforms..

1
Is this WinForms, Silverlight, WebForms, WPF? - marcind
If by "move" you mean show next or previous item as selected, then it is automatic you don't need to do anything for it. - TheVillageIdiot

1 Answers

1
votes

Assuming WinForms, this is the default behavior when the ComboBox has focus.

If you're not clicking on the ComboBox, you're going to have to do something about it:

  • Listen for the MouseEnter event and set focus on the ComboBox.
  • Or, use Key Preview, listen for the q, Up, and Down keys, check the mouse position, and act accordingly.