Blitz3D+ Command Reference

GadgetX ( gadget )

Parameters

gadget - gadget to read the position of

Description

Returns a gadget's x position.

Requires Extended language mode.

Reads the left edge of the gadget in logical 96-DPI units, relative to the client area of its group - the same value you passed at creation or with SetGadgetShape, kept current by any SetGadgetLayout rules that have moved it since. For a window, x is a desktop coordinate instead.

Together with GadgetY, GadgetWidth and GadgetHeight it gives you a gadget's full geometry - the inputs for manual layout: placing one gadget just right of another, or saving a window's position to restore next run.

Because the value is logical, it matches on every monitor; the GUI handles per-monitor DPI scaling underneath.

The world editor shell sample shows the layout work these getters support.

See also: GadgetY, GadgetWidth, GadgetHeight, SetGadgetShape, SetGadgetLayout.

Index