Click here to Skip to main content
16,022,309 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
I use textbox.Readonly=true for having a Readonly textbox.

How about a Combobox? How can I have readonly ComboBOx without "hiding" or using "enable=false"?
Posted
Updated 31-Jul-10 21:33pm
v2

Set the ComboBox.DropDownStyle property to DropDownList.
 
Share this answer
 
Comments
koool.kabeer 1-Aug-10 16:34pm    
that does not make the ComboBox as ReadOnly...
You can edit the Text in ComboxBox Text even after setting its DropDownStyle property to DropDownList......
Didnt expect this from you......
No there is no direct property like 'ReadOnly' for ComboBox.

Have a look at this article for it: Read only ComboBox[^]
 
Share this answer
 
Look no further than Read only ComboBox[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900