Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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=-

Whatever thy hand findest to do, do it with all thy heart - Jesus
Posted

Thanks Simcoder,

 

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

 

Once again thanks

 

Simon

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...