Blitz3D+ Command Reference

ClientWidth ( group )

Parameters

group - window, panel, group box, splitter pane, tabber or other gadget group to measure

Description

Returns the interior width of a gadget group, in logical units.

Requires Extended language mode.

Measures the client area of a group - the space actually available to child gadgets, with the window furniture already taken off. For a window that means inside the frame, menu and status bar; for a group box it is the inset area below the caption; for a splitter pane or tabber it is the pane or page itself.

The value is in logical 96-DPI units, the same coordinate space you position gadgets in, so you can use it directly when creating children: the world editor shell creates its viewport with CreateCanvas 0,0,ClientWidth(pane),ClientHeight(pane) so the canvas fills the pane exactly. After creation, SetGadgetLayout is usually the better tool for tracking resizes automatically.

Note the difference from GadgetWidth, which reports the group's outer width including any frame.

See it working in the world editor shell sample and the native input controls sample.

See also: ClientHeight, GadgetWidth, SetGadgetLayout, CreateWindow, SplitterPanel.

Index