How to place SplitContainerControl's splitter at a percentual position?

Guillermo Gutiérrez picture Guillermo Gutiérrez · Aug 13, 2013 · Viewed 7.2k times · Source

Is there a way to place SplitContainerControl's splitter at a percentual position of the control size, that keeps even if its container is resized? Or, on the other hand, set the size of the panels to a percentual value?

Answer

DmitryG picture DmitryG · Aug 14, 2013

If the SplitContainerControl.FixedPanel property is set to the SplitFixedPanel.None value, the panels' widths (or heights) are changed proportionally when the container is being resized. Thus, just do not use fixed panels within SplitContainerControl:

splitContainerControl1.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.None;
splitContainerControl1.SplitterPosition = splitContainerControl1.Width / 3;