every time I resize my form, panel2 get bigger, I want panel1 to get bigger and panel2's height to stay the same unless the user changes the splitterdistance themselves.
Asked
Active
Viewed 1,023 times
1 Answers
1
Try setting the FixedPanel property:
splitContainer1.FixedPanel = FixedPanel.Panel2;

Hans Passant
- 922,412
- 146
- 1,693
- 2,536

LarsTech
- 80,625
- 14
- 153
- 225
-
That will still cause panel2 to resize instead of panel1. – user3397642 Mar 10 '14 at 23:15
-
@user3397642 How so? I made Panel2 fixed, so it doesn't get resized. – LarsTech Mar 10 '14 at 23:16
-
Perhaps it's a problem with c# itself? – user3397642 Mar 10 '14 at 23:26
-
@user3397642 Highly doubtful. Try posting code that will reproduce the problem. Chances are *something else* is causing the problem. – LarsTech Mar 10 '14 at 23:28
-
@user3397642 I can't duplicate the issue you describe. I set the FixedPanel property to Panel2 and Panel2 does not get resized when adjusting the size of the control. Only Panel1 does. – LarsTech Mar 10 '14 at 23:48