Function getHorizontalAlignment

  • Get the horizontal alignment for a widget.


    • widget: Widget

      The widget of interest.

    Returns Layout.HorizontalAlignment

    The horizontal alignment for the widget.


    If the layout width allocated to a widget is larger than its max width, the horizontal alignment controls how the widget is placed within the extra horizontal space.

    If the allocated width is less than the widget's max width, the horizontal alignment has no effect.

    Some layout implementations may ignore horizontal alignment.