Syntax
JustifyFlag = WidgetGetJustify(Widget)
Description
Retrieves the current justification setting for the specified widget within its parent layout container. Justification determines how the widget is positioned along the main-axis of the layout (e.g., horizontally in a row, vertically in a column) if there is extra space available.
Parameters
Widget
The handle of the ProGUI widget whose justification setting is to be retrieved.
Return Value
Returns one of the following justification flags, or #False if the widget handle is invalid:
#PG_Widget_Justify_Start : Aligns the widget to the start of its allocated space on the main-axis.
#PG_Widget_Justify_Center : Centers the widget within its allocated space on the main-axis.
#PG_Widget_Justify_End : Aligns the widget to the end of its allocated space on the main-axis.
If no specific justification has been set using WidgetSetJustify(), the effective justification might depend on the parent layout's `JustifyItems` or `JustifyGridItems` property, but this function only returns flags explicitly set on the widget itself. If no flag is explicitly set, it might implicitly return #False (representing the default 'start' behavior).
Remarks
Widget justification is primarily relevant for Flexbox and Grid layouts when the widget's size is smaller than the space allocated to it by the layout along the main axis. This property corresponds to the `justify-self` property in CSS Grid and influences alignment within the conceptual "cell" or space given to the item.
See Also
WidgetSetJustify, WidgetSetAlign, LayoutFlexSetJustify (for justifying the entire line/content), LayoutGridSetJustifyItems
Supported OS
Windows, Linux