|
-
Aug 7th, 2005, 10:54 PM
#1
Thread Starter
Addicted Member
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:
Picture2:
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
-
Aug 7th, 2005, 11:19 PM
#2
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.
-
Aug 7th, 2005, 11:31 PM
#3
Thread Starter
Addicted Member
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?
-
Aug 7th, 2005, 11:43 PM
#4
-
Aug 7th, 2005, 11:47 PM
#5
Thread Starter
Addicted Member
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?
-
Aug 8th, 2005, 01:02 AM
#6
Fanatic Member
Re: Question on changing color of form
The form defaulr backcolor is control here..Which version of .net are you using?
Godwin
Help someone else with what someone helped you! 
-
Aug 8th, 2005, 01:22 AM
#7
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.
-
Aug 8th, 2005, 11:38 AM
#8
Thread Starter
Addicted Member
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
-
Aug 8th, 2005, 11:50 AM
#9
Re: Question on changing color of form
 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.
-
Aug 8th, 2005, 12:13 PM
#10
Thread Starter
Addicted Member
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?
-
Aug 8th, 2005, 12:34 PM
#11
Re: Question on changing color of form
 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.
-
Aug 8th, 2005, 05:14 PM
#12
Thread Starter
Addicted Member
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?
-
Aug 8th, 2005, 05:19 PM
#13
Thread Starter
Addicted Member
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
-
Aug 8th, 2005, 09:18 PM
#14
Re: Question on changing color of form
 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 ?
-
Aug 8th, 2005, 10:45 PM
#15
Thread Starter
Addicted Member
Re: Question on changing color of form
-
Aug 8th, 2005, 10:58 PM
#16
Fanatic Member
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.
"so just keep in mind that fantasy is not the same as realtiy and make sure u remember that wii sports may be fun but u cant count on it as exercise ok cool bye" - HungarianHuman
-
Aug 8th, 2005, 11:02 PM
#17
Thread Starter
Addicted Member
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.
-
Aug 8th, 2005, 11:03 PM
#18
Fanatic Member
Re: Question on changing color of form
 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.
"so just keep in mind that fantasy is not the same as realtiy and make sure u remember that wii sports may be fun but u cant count on it as exercise ok cool bye" - HungarianHuman
-
Aug 8th, 2005, 11:20 PM
#19
Thread Starter
Addicted Member
Re: Question on changing color of form
It Works. I Went Through The Designer Code And Fixed Them! Thanks So Much!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|