Hi guys
I am having a few problems with combo boxes, i have inherited a combo box to add some more features, i also provide a data view as the datasource, this side is working well. I have the dropdown style to dropdown and the autocomplete mode to suggest append. If the box has focus and i hold alt + arrow down then the list displayes. If i type for example 'a' whilst the list is dropped down a further list is displyed with my selection, if i highlight my choice and then press enter then the box is empty. If i use tab then my selection is displayed. is this correct or am i doing something wrong here i have experimented with different autocomplete modes.
Regards
Steve

Combo box (again)
jecker01
Salvador Rocha
I think there is a bug in here - or at least I'm seeing something rather strange.
Do you see the original list as well as the filtered list on top of it. If you do then thats a problem. I do and when I press enter I get a blank content returned. I think that it is because on the original list shown underneath I still havent selected anything. The reason I think its a bug here is because there should be only one dropdown list being shown.
As it hasnt been mentioned much I would guess its not that common as most people will select using a mouse only (hey its windows) but something doesnt look quite right.
CDQ
Guys
Thank you for your input, does anyone know why the thread is marked as answered
alesqlserver
I'm sure there is a bug here - I spent hours recently trying to understand the perverse behaviour of the combobox when using keyboard input.
If the AutoCompleteMode is set to Suggest or SuggestAppend then the second list appears, to suggest which entry to use - which is fine - I don't think that is a bug.
However, if you choose an item from this list, then it appears in the box only if the box is not dropped down. If the box is dropped down then when the drop down closes the box is left blank. That is perverse - call it a bug if you like.
To make matters worse if you have already selected an item in the list, and this is already displayed, try dropping down the list and entering some new text. The suggestion list comes up - select an item and press Enter. The box shows nothing. But check the selected index and it is still set to the previously selected item. Drop the box again and do the same. Again the box is empty but then when you check the selected index it is set to -1.
In the end I gave up, set the AutoCompleteMode to Append and wrote my own code to make it behave how I thought it should.
h1
My apologies Spotty, thank you
On a slightly different theme, not sure if this needs its own thread but, i am having similar problems with textboxes.
If i enter data into a text box (tried with accepts return true & false) it accepts the data, if i come back to the textbox with data in, if i then place the cursor at the end of the text and add some text and then press enter the box is empty. I have tried several things here to try and trap the empty box but it doesnt seem to work. I have also tried using the key preview and e.handled but no luck, however if i use suppresskeypress=true then its ok.
Once again guys am i doing something wrong here
Regards
Steve
rogupta
The two lists is what shouldnt happen and I am almost certain this is a bug. There should be only one list which is filtered as you type.
shinji360
Spotty thanks for taking time to reply.
If i have the box dropped down by pressing alt + arrow down, when i make a selection using the keyboard for example pressing 'b' then a further list drops down (so i have 2 lists displayed) showing a list starting with my characters. If i press enter then the combo is blank, if i press tab then my selection appears in the combo. I thought this list within a list was a new feature.
Regards
Steve
Sam Jost
Yes, I'd marked it answered as its a bug and I've logged it with MS windows forms control team.