Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keeping One Split Container Panel Fixed Width?

Tags:

c#

winforms

I can't seem to figure out how to keep a panel's width fixed in a Split Container in a WinForm.

Any suggestions?

like image 1000
sooprise Avatar asked Jul 26 '10 19:07

sooprise


4 Answers

In order to make panel1 fixed In the properties of the SplitContainer, set the FixedPanel property to Panel1.

Then, set the SplitDistance and Panel1MinSize to the same value.

like image 20
JustCode Avatar answered Oct 23 '22 16:10

JustCode


property SplitterPanel.FixedPanel - set one of the panels to fixed size

property SplitterPanel.IsSplitterFixed - set to true

like image 73
Dmitri Avatar answered Oct 23 '22 17:10

Dmitri


Fix Panel (Lock Panel):

SplitContainer.FixedPanel = FixedPanel.Panel

like image 8
Pratik Mistry Avatar answered Oct 23 '22 16:10

Pratik Mistry


If you'd keep one panel's size fixed, there is no logical way to move the splitter. Since you can't move the splitter, it just doesn't make sense to use a SplitContainer anymore. Use two Panel controls.

like image 6
Hans Passant Avatar answered Oct 23 '22 16:10

Hans Passant