Is there a way (without including new controls in the project :) to customize the Sp开发者_Python百科litContainer in order to visually indicate to the user that there is a splitter container (I have an horizontal one), and not just some space between controls?
PS.
I would like do not modify the colors. Also I find 3D Border ugly.. perhaps fill-in a "picture" in the split delimiter space?
Select the SplitContainer and change BorderStyle to Fixed3D to get this effect:
if you want to customize that control still using that control (make sense), and provided properties are not enough for your needs you can always override the WindowProc
and handle WM_PAINT
message yourself for that control, so you can draw whatever you want :)
Just change the BackColor
property to something else, but then change the two inner panels to different colors:
splitContainer1.BorderStyle = BorderStyle.None;
splitContainer1.BackColor = SystemColors.ControlDark;
splitContainer1.Panel1.BackColor = SystemColors.Control;
splitContainer1.Panel2.BackColor = SystemColors.Control;
To finish the look (I know you said not adding other controls, so ignore this part if that's mandatory), place the splitContainer inside a panel and Dock.Fill it with the parent panel having these properties:
splitParent.BackColor = SystemColors.ControlDark;
splitParent.Padding = new Padding(1);
Result:
精彩评论