SetSplitterResizeMode splitter,mode
Parameters
|
splitter - gadget returned by CreateSplitter mode - how the panes share changes to the splitter's size: 0: keep the first pane's size; the second pane flexes (default) 1: keep the second pane's size; the first pane flexes 2: preserve the proportion of space occupied by each pane |
Description
|
Sets which pane grows or shrinks when a splitter is resized. For a left/right splitter, first means left and second means right. For a top/bottom splitter, first means top and second means bottom. SetGadgetLayout controls the splitter's bounds inside its parent. SetSplitterResizeMode controls how those bounds are divided between its two panes. SetSplitterLimits still enforces their minimum sizes. Calling this command remembers the current pane sizes without moving the divider. Dragging the divider establishes a new preferred size or proportion. Automatic resizing does not overwrite that preference: if a small window forces a pane to shrink, its preferred size returns when space permits. Proportions exclude the divider itself and do not accumulate rounding errors over resize cycles. If proportional mode is selected with no available pane space, it starts at equal proportions. An explicit SetSplitterLimits call clamps the current divider and establishes a new preferred layout. Configure the initial geometry and limits before setting the resize mode. Values other than 0, 1, or 2 produce a runtime error. For a three-pane editor with nested left/right splitters: ; outerSplitter: hierarchy | (viewport and inspector) SetGadgetLayout outerSplitter,1,1,1,1 SetSplitterResizeMode outerSplitter,0 ; innerSplitter: viewport | inspector SetGadgetLayout innerSplitter,1,1,1,1 SetSplitterResizeMode innerSplitter,1 The hierarchy and inspector retain their user-chosen widths while the viewport absorbs changes to the window width. See the complete Blitz3D+-authored World Editor sample. Requires Extended mode. See also: CreateSplitter, SetSplitterDragMode, SplitterPanel, SetSplitterLimits, SetGadgetLayout. |
Index