Form

GPALSplitter

Everything on Settings Every Control Takes applies here too. GPAL.Splitter builds one. HSplit makes a left and right split and VSplit a top and bottom one, each taking either a pixel size for the first pane or a fraction of the whole as a double. WithFormControl adds controls, and GPAL.SplitRight or GPAL.SplitBottom marks where the first pane ends and the second begins. WithHeight sets the splitter's own height; without one it measures the taller pane, or both panes plus the bar for a top and bottom split. A handler registered on the splitter answers SplitterMoved, which is what a workflow wants when it needs to know or remember where the divider ended up; the handler takes a SplitterEventHandler rather than an EventHandler, since that is what carries the new position.

NOTE

HSplit(240) keeps the left pane at 240 pixels however the form is resized. HSplit(0.25) keeps it at a quarter of the width. Use the fixed form for a control that has a natural size, such as a list of names, and the proportional form when both panes should grow together.

Examples

GPAL Fluent: High-level fluent C# API

//The marker is what divides the two panes; everything before it is in the first, everything after it in the second. A splitter with no marker puts everything in the first pane.

GPALSplitter panes = (GPALSplitter)GPAL.Splitter

.HSplit(0.35)

.WithFormControl(workflows) // left pane

.WithFormControl(GPAL.SplitRight)

.WithFormControl(output) // right pane

.WithName("panes");

💬 Ask GPAL