SplitContainerAdv panel backcolors do not stick

Using the SplitContainerAdv sample, try setting the Style to say Office2007Blue.

Then, specify Panel1 backcolor to White, BackgroundColor.Style=Solid, BackgroundColor.BackColor = White

Close the form.
Open the form.
Colors did not stick.
You also cannot set via code as the panel1.BackGroundColor.Style property is read only.

I want the Office2007Blue so the Splitter looks like it does, but don't want the panels to be gradient, and need to specify their back color.

Other than putting a control on the panel and specifying its backcolor, is there a way to do this?



1 Reply

ER ERobishaw November 9, 2007 07:30 PM UTC

Found the solution:
Set the entire BackgroundColor object.
i.e.:
splitMain.Panel1.BackgroundColor = new BrushInfo(Color.Transparent);



>Using the SplitContainerAdv sample, try setting the Style to say Office2007Blue.

Then, specify Panel1 backcolor to White, BackgroundColor.Style=Solid, BackgroundColor.BackColor = White

Close the form.
Open the form.
Colors did not stick.
You also cannot set via code as the panel1.BackGroundColor.Style property is read only.

I want the Office2007Blue so the Splitter looks like it does, but don't want the panels to be gradient, and need to specify their back color.

Other than putting a control on the panel and specifying its backcolor, is there a way to do this?





Loader.
Up arrow icon