when we drop-down a combobox, we have two ways of selecting an item:
1-point with mouse and click
2- navigate to the desired item with arrow keys and press enter or tab
in 1, while mouse pointer moves from item to item, the "listindex" property does not change. therefore "text" property does not change either. the mouse pointer only highlights items. listindex only changes when an item is "selected".
in 2, listindex changes everytime we press down arrow key or up arrow key. item is not just highlighted, it is also selected, which causes the .text property to change too.
is there any way to use arrow keys to just highlight, not select, combo items?
because,
this difference is causing me a huge problem: I'm trying to adopt a code that filters the contents of comboboxes as the user types text. The code reads the text and returns the records that are "like *text*". When a user types a few characters and the dropdown list is filtered down to a few items, the user attempts to press down arrow key, which selects the first item in the combo, which in turn changes the .text property, which in turn filters the combo down to just one item, which is that item.
1-point with mouse and click
2- navigate to the desired item with arrow keys and press enter or tab
in 1, while mouse pointer moves from item to item, the "listindex" property does not change. therefore "text" property does not change either. the mouse pointer only highlights items. listindex only changes when an item is "selected".
in 2, listindex changes everytime we press down arrow key or up arrow key. item is not just highlighted, it is also selected, which causes the .text property to change too.
is there any way to use arrow keys to just highlight, not select, combo items?
because,
this difference is causing me a huge problem: I'm trying to adopt a code that filters the contents of comboboxes as the user types text. The code reads the text and returns the records that are "like *text*". When a user types a few characters and the dropdown list is filtered down to a few items, the user attempts to press down arrow key, which selects the first item in the combo, which in turn changes the .text property, which in turn filters the combo down to just one item, which is that item.