Question on changing color of form
Hey! Using a color dialog, I made it so that the user can change the color of the program background. It changes alright, but some of the controls dont change fully. I have a few pictures below. The first is the original color, then the second is after I change it to blue. Notice what happens in the red squares.
Picture1:
http://img.photobucket.com/albums/v7...ick/color3.jpg
Picture2:
http://img.photobucket.com/albums/v7...ick/color4.jpg
I checked the properties of each box and they appear the same. Any ideas why its acting strange like that? Id like either both of them to be filled the same, or both of them to just be the original color and the entire box FULLY surrounded with the color.. Thanks so MUCH
John
Re: Question on changing color of form
either you are setting those particular frames to the new color OR their backround color is set to Transparent, so that it picks up the form color. Go through them all at design time and change all their backcolor to Transparent and that should make them all get the forms color.
Re: Question on changing color of form
hey. I'm actually setting the backcolor of the tabpage so I know thats not the problem. All of the group boxes are set to the color "controlLightLight". When I try and change them to transparent, I get an error that says transparent isn't a valid color for them. Any ideas?
Re: Question on changing color of form
Hey,the backcolor by default is "Control"...I wonder why you need transparent then..Just change all their back colors to "Control" :) I think this would work
Re: Question on changing color of form
well... uh my form normall isn't the 'control' color. I think looks too dark. I like it at the controllightlight... whats next?
Re: Question on changing color of form
The form defaulr backcolor is control here..Which version of .net are you using?
Re: Question on changing color of form
You need to change the backcolor of all your frames to change backcolor at the same time as your form, since they do not accept transparent.
Re: Question on changing color of form
ok.. well i dont want the frames to be the same color.. i want just the background of the page to change.. and thats what I did in my code. But for some reason some of them end up changing and some of the fonts background change and its really erratic!
John
Re: Question on changing color of form
Quote:
Originally Posted by JohnRChick
ok.. well i dont want the frames to be the same color.. i want just the background of the page to change.. and thats what I did in my code. But for some reason some of them end up changing and some of the fonts background change and its really erratic!
John
ok, are you setting your frames backcolor at runtime or design time? what i suspect at the moment is perhaps changing the color object to set the form with which is used also to set the frames.
Re: Question on changing color of form
i have the forms all set to 'controllighlight' at design time. What do you mean by what you said?
Re: Question on changing color of form
Quote:
Originally Posted by JohnRChick
i have the forms all set to 'controllighlight' at design time. What do you mean by what you said?
it doesnt matter, as you are setting it at design time. That also means that perhaps you should double check those three group boxes and make sure they are not set the transparent, as i cannot think of any other causes at this point in time.
Re: Question on changing color of form
hmm ok.. I checked them and they;re not set to transparent.. It appears as though any NEW group boxes that I add will automatically take the background color (even if they're set to lightlight).. This is so weird.. Anyone have a suggestion?
Re: Question on changing color of form
I JUST NOTICED SOMETHING! When I click on some of the group boxes, the words 'ControlLightLight' are bold.. and on some of them its not. The ones that are bold dont change their background color, and the ones that aren't DO change the background color.
John
Re: Question on changing color of form
Quote:
Originally Posted by JohnRChick
I JUST NOTICED SOMETHING! When I click on some of the group boxes, the words 'ControlLightLight' are bold.. and on some of them its not. The ones that are bold dont change their background color, and the ones that aren't DO change the background color.
John
That's weird, i have never come accross that.. are you using .net 2005 ?
Re: Question on changing color of form
Re: Question on changing color of form
When a property is bold it means that it's not the default. Some controls like the groupbox or the label adopt the form's backcolor only if you haven't altered the control's backcolor property.
A simple way to get the defaults back is to go to your windows forms designer generated code and delete all the lines that assign colors to the backcolor property of the controls.
Re: Question on changing color of form
so would this explain why some of them are changing, and some aren't? I can get the misbehaving ones to change if i manually assign them the color once the user selects it.
Re: Question on changing color of form
Quote:
Originally Posted by JohnRChick
so would this explain why some of them are changing, and some aren't? I can get the misbehaving ones to change if i manually assign them the color once the user selects it.
In that case just do it for all off them, it's neater and you can use a loop.
Re: Question on changing color of form
It Works. I Went Through The Designer Code And Fixed Them! Thanks So Much!!