Click here to Skip to main content
15,898,371 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
this is my code

BrushConverter conv = new BrushConverter();
               SolidColorBrush brush = conv.ConvertFromString(comboBox1.Text) as SolidColorBrush;
               this.comboBox1.Background = brush;


for some reason the colour of the combobox isn't the same colour of what the text is selected.

Please help me.

Thanks in Advance.
Posted
Updated 21-Jun-11 21:26pm
v2

1 solution

Well, obviously there's issues with this code, but, are you color blind ? Have you checked your monitor settings ? I don't see how passing 'Blue' to this code could ever result in a brush that is not Blue. Are you debugging and checking the code itself to see what color the brush is ?
 
Share this answer
 
Comments
[no name] 22-Jun-11 5:52am    
yes and the colour doesn't change the first time i change it
[no name] 23-Jun-11 5:31am    
and yes, i am colour blind

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