Reputation: 5159
I'm working with a WinForms SplitContainer in C# and would like to set an initial size for one of the panels. I know you could set the minimum size, but beyond that I haven't been able to find anything else that would do this, and I want the panels to be resizable to whatever after the initial opening of the window.
Is there a way to do this in the Visual Studio designer (percentage-wise, one panel ~25% and the second taking the rest) without manually coding it in, which would be the obvious solution?
Upvotes: 1
Views: 2415
Reputation: 5159
This is doable within the designer by clicking on the slider and then resizing the panels to the size wanted (courtesy of HansPassant's comment.)
It's not highly precise, so you can't use it to be pixel-perfect, but if pixel-perfect alignment is needed then a TableLayoutPanel
control makes more sense to use.
Upvotes: 1