How do I suppress the SelectAll when tabbing into a ComboBox?
-
Hi there I would like to be able to stop all text in a ComboBox from being automatically selected when I tab into a it (it has DropDownStyle of DropDown). Currently, I check for KeyUp event, and select the text I want to select, rather than the whole lot. This still has the effect of all text being selected temporarily until the tab key is released. Is there any way to suppress the SelectAll behaviour? Thanks in advance Paul
One day I want to be a code monkey. Right now, I'm more like a code amoeba...
-
Hi there I would like to be able to stop all text in a ComboBox from being automatically selected when I tab into a it (it has DropDownStyle of DropDown). Currently, I check for KeyUp event, and select the text I want to select, rather than the whole lot. This still has the effect of all text being selected temporarily until the tab key is released. Is there any way to suppress the SelectAll behaviour? Thanks in advance Paul
One day I want to be a code monkey. Right now, I'm more like a code amoeba...
-
Instead of using KeyUp, try wiring Enter or GotFocus event and deselecting the text.
The need to optimize rises from a bad design. My articles[^]
-
Thanks Mika, GotFocus solved it. Enter occurs before the SelectAll, otherwise I would have used that. Never knew about GotFocus though, so awesome result! :) Cheers Paul
One day I want to be a code monkey. Right now, I'm more like a code amoeba...