Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i have Desk top Application in C#... I set the combox style as Dropdownlist and flat..but when i disable the combobox it show like black border around it...pls help me what is there happen??
Posted
Comments
Gaurav Makwana 18-Dec-13 3:52am    
kavita check forecolor and back color of flat style or combobox both
may be it will help you

There is no standard way to do that AFAIK - it's an intended behaviour of the control and there is no Border property, so the chances are you are stuck with it.

You could get rid of it yourself, by inheriting your own control from ComboBox and handling the drawing yourself (just overwriting the border when it is disabled should do it - I haven't tried) or just hide the Combobox and display a fixed label in the same place with the same text!
 
Share this answer
 
Comments
kavita painter 16-Dec-13 3:24am    
but i also face the same problem in textbox...even textbox have border style property...if i set the textbox border style as Fixed3d...
OriginalGriff 16-Dec-13 5:42am    
This is by design - if you want different behaviour, then you will have to produce your own controls.
wherever you want to disable your combobox just see borderproperty dynamically
it will solve!
 
Share this answer
 
Comments
kavita painter 18-Dec-13 3:34am    
but combobox doesn't have border property...
flat style appears like black border...if you change, select style as standard...
 
Share this answer
 
Comments
kavita painter 16-Dec-13 3:25am    
i tried but it not worked
An@nd Rajan10 16-Dec-13 3:32am    
try to new combobx, that face a same problem?
kavita painter 16-Dec-13 3:38am    
yes...;-(
An@nd Rajan10 16-Dec-13 3:46am    
if you don't mind please sent the project to me...
anandr.btech@gmail.com

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