lidds Posted August 19, 2005 Posted August 19, 2005 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 Quote
Simcoder Posted August 19, 2005 Posted August 19, 2005 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=- Quote Whatever thy hand findest to do, do it with all thy heart - Jesus
lidds Posted August 21, 2005 Author Posted August 21, 2005 Thanks Simcoder, That's exsacually what I want, such a simple thing but was bugging the hell out of me. Once again thanks Simon Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.