Fixed Panel Height in a SplitContainer

前端 未结 5 1252
情深已故
情深已故 2021-02-20 14:07

I have a WinForm containing a bindingNavigator at the top and a splitContainer with two horisontal panels below it. The splitContainer fills the space not occupied by the bindin

相关标签:
5条回答
  • 2021-02-20 14:25

    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;
    
    0 讨论(0)
  • 2021-02-20 14:28

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

    0 讨论(0)
  • 2021-02-20 14:28

    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;
    
    0 讨论(0)
  • Set the FixedPanel property to the panel you want to remain the same size.

    0 讨论(0)
  • 2021-02-20 14:42

    Best way you can set isSplitterFixed Property to "True"

    0 讨论(0)
提交回复
热议问题