Blitz3D+ Command Reference

CreateGroupBox ( text$,x,y,width,height,group[,style] )

Parameters

text$ - caption shown on the box's top edge

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

width,height - size of the group box

group - window or gadget group that owns the group box

style (optional) - 0 (default); other values are reserved

Description

Creates a captioned group box that other gadgets can be placed inside, and returns its handle.

Requires Extended language mode.

The returned handle is a true group: pass it as the group parameter of other Create commands to build a framed, captioned cluster of controls - the classic object inspector panel. Child coordinates are relative to the box's inset client area below the caption, which ClientWidth and ClientHeight measure.

Everything you can do to an ordinary gadget applies: SetGadgetLayout to follow window resizes, show/hide, enable/disable, fonts, and FreeGadget - which frees the box together with every gadget inside it. The caption is UTF-8 like all GUI text.

Use group boxes to give related settings one visual identity (and, for radio buttons, one exclusive set); use a plain CreatePanel when you want a container without the frame and caption.

See it working in the native input controls sample, which builds a whole inspector inside one.

See also: CreatePanel, CreateSeparator, ClientWidth, SetGadgetLayout, FreeGadget, CreateWindow.

Index