Fixed Panel Height in a SplitContainer

微笑、不失礼 提交于 2019-12-04 02:58:21

Set the FixedPanel property to the panel you want to remain the same size.

As pointed out by Lee:

Set the FixedPanel property to the panel you want to remain the same size.

This works like this:

teamSplitContainer.SplitterDistance = teamSplitContainer.Height - 100;
teamSplitContainer.FixedPanel = FixedPanel.Panel2;

I'd use a TableLayoutControl for something like this rather than a Splitter.

Best way you can set isSplitterFixed Property to "True"

If you want only show and disable the panel (no automatic resize, no resize by the user) add to the code by Sakkle this line:

teamSplitContainer.IsSplitterFixed = true;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!