Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Splitter Color

Status
Not open for further replies.

SgtJarrow

Programmer
Apr 12, 2002
2,937
US
Using VS2008/.Net 3.5, is it possible to change the color of the Splitter in a SplitContainer??

I don't see a property for it, nor in the SplitterRectangle object. I am currently trying to do something through Paint and Graphics.DrawRectangle, but not any luck.

All I want to do is make the splitter line itself black.....

Thanks for your help.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB.NET Programmer
 
Okay...nevermind. I answered it myself.

Solution:
Set the backcolor of the SplitContainer control to whatever color you want the splitter to be. Then set the backcolor of the controls in each panel to be something else.

My trouble was that I have a datagridview in the left panel and picturebox in the right panel. The SplitContainer, and subsequently the datagridview and picturebox, were inheriting the the backcolor of the Form. So by setting each one explicitly, I got the effect I was looking for.

Thanks for looking.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB.NET Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top