开发者

Emphasize the SplitContainer

开发者 https://www.devze.com 2023-04-02 03:39 出处:网络
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 a

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?

Emphasize the SplitContainer

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:

Emphasize the SplitContainer


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:

Emphasize the SplitContainer

0

精彩评论

暂无评论...
验证码 换一张
取 消