Help with combobox...

lidds

Junior Contributor
Joined
Nov 9, 2004
Messages
210
I have a combobox on a form which contains 2 selections. What I have found is if the user select's from the combobox it hilights the text within the combobox, if the user then hits the deleted key on the keyboard it removes the text. But if the user select's the combobox again the text that was previously deleted is still avaliable in the dropdown.

My question is how do I stop the text from being hilighted / deleted???

I have looked for a readonly attribute, but there does not seem to be one for the combobox.

Thanks

Simon
 
If I'm understanding you correctly, you don't want the user to clear text in the text area of the combobox? Because deleting the text, does not delete the item in the combobox itself. If you want to prevent users from pressing the delete key and removing text, go to the properties tab for the combobox and change DropDownStyle to DropDownList instead of just dropdown. Users won't be able to free type in the text area nor delete text that is currently displayed.

-=Simcoder=-
 
Thanks Simcoder,

That's exsacually what I want, such a simple thing but was bugging the hell out of me.

Once again thanks

Simon
 
Back
Top