Blitz3D+ Command Reference

CreateSplitter ( x,y,width,height,group[,style] )

Parameters

x,y - position of the splitter's top-left corner within the group's client area

width,height - size of the splitter

group - window or gadget group that owns the splitter

style (optional) - pane arrangement
1: left/right panes (default)
2: top/bottom panes

Description

Creates a splitter with two user-resizable panes and returns its handle.

Requires Extended language mode.

A splitter divides its space into two panes with a draggable divider between them - the backbone of the classic editor layout with a 3D viewport on one side and an inspector on the other. Each pane is a gadget group: fetch its handle with SplitterPanel(splitter,0) and SplitterPanel(splitter,1), then create child gadgets inside and size them with ClientWidth and ClientHeight.

Dragging the divider posts gadget-action events ($401) with the divider position in EventData, and your event and render loop keeps running during the drag - a 3D canvas in one pane keeps animating while the user resizes it.

Give the splitter a SetGadgetLayout so it follows window resizes; the panes and their contents follow along.

See it working in the world editor shell sample.

See also: SplitterPanel, CreatePanel, SetGadgetLayout, ClientWidth, CreateWindow.

Index