WidgetGetY

Syntax

Y.d = WidgetGetY(Widget, ReturnLayoutDefined=#False)

Description

Retrieves the current vertical position (Y coordinate) of the specified widget's top-left corner in device-independent pixels (DIPs), relative to its parent layout container's client area (inside padding). Optionally, it can return the initial Y value specified during creation (only relevant for Basic layouts).

Parameters

Widget
The handle of the ProGUI widget whose Y coordinate is to be retrieved.

ReturnLayoutDefined (optional)
If set to #True, the function returns the initial Y value set during CreateWidget() or via WidgetResize(). If #False (default), returns the actual calculated Y position determined by the layout engine.

Return Value

Returns the requested Y coordinate as a floating-point number (Double) in DIPs. Returns 0.0 or #False if the widget handle is invalid.

Remarks

The actual rendered position (`ReturnLayoutDefined = #False`) is determined by the parent layout engine (Basic, Flexbox, or Grid) based on the widget's properties (margins, size, etc.) and the layout's rules. The layout-defined position (`ReturnLayoutDefined = #True`) is generally only meaningful for widgets within a Basic layout.

See Also

WidgetGetX, WidgetGetWidth, WidgetGetHeight, WidgetResize, CreateWidget

Supported OS

Windows, Linux