|
-
July 18th, 2007, 04:52 AM
#1
changing background color
Hi, i've got a problem here. i can't figure out why my form background and also the button change its color when i call the function below. how can i ensure that only the background changes? besides that, in the form i also need to draw and show some circles. How to ensure that when the background color changes, it still there?
public void b1_click(object sender, EventArgs e)
{
clg.ShowDialog();
this.BackColor = clg.Color;
}
-
July 18th, 2007, 07:09 AM
#2
Re: changing background color
Child controls automatically use the colors of their parents. This is the same as when you disable a groupbox, all controls in that groupbox get disabled.
You must manually set the background color of all child controls that should behave differently or use the Paint event to paint the forms background yourself.
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
|