SetSplitterDragMode splitter,mode
Parameters
|
splitter - gadget returned by CreateSplitter mode - divider drag behaviour: 0: resize panes continuously while dragging (default) 1: show a guide line and resize panes only when the mouse button is released |
Description
|
Chooses whether a splitter drag resizes panes continuously or previews the divider first. Mode 1 is useful for expensive layouts containing multiple 3D canvases. The panes and their child gadgets keep their current positions and sizes throughout the drag. A non-activating guide line indicates the proposed divider position. Normal application events and rendering continue; this is not a global redraw lock. Releasing applies the layout once. SetSplitterLimits clamps both the guide and the committed position. In mode 1, a changed position emits one gadget-action event ($401) on release, with the divider position in EventData. An unchanged or cancelled drag emits no gadget-action event. Both modes emit application begin/end-modal events around the drag. Escape, loss of mouse capture, hiding or disabling the containing gadget, or destroying the splitter cancels a deferred drag. Changing the splitter's bounds, limits, resize mode, or drag mode also cancels a pending drag. Cancellation does not apply the proposed position. In mode 0, geometry already applied during a drag remains applied. This setting works with both left/right and top/bottom splitters. It does not change how the outer window resizes; use SetSplitterResizeMode to choose which pane absorbs changes to the splitter's overall size. Invalid modes produce a runtime error. splitter=CreateSplitter(0,0,ClientWidth(window),ClientHeight(window),window,1) SetGadgetLayout splitter,1,1,1,1 SetSplitterLimits splitter,200,300 SetSplitterDragMode splitter,1 See the complete World Editor sample for an Assets workspace using deferred dragging. Requires Extended mode. See also: CreateSplitter, SplitterPanel, SetSplitterLimits, SetSplitterResizeMode. |
Index