Preparing search index...

    Enum defining how a widget resizes along an axis: Fixed, Minimum, MinimumExpanding, Maximum, Preferred, Expanding, or Ignored.

        // SizePolicy.Policy controls how a widget's size behaves within a layout.
    // Use widget.setSizePolicy(horizontal, vertical) to configure both axes.
    const root = new Widget(parent);
    const layout = new BoxLayout();
    layout.setDirection(Direction.TopToBottom);
    root.layout = layout;

    const fixedLabel = new Label(root);
    fixedLabel.text = 'Fixed height label';
    fixedLabel.setSizePolicy(SizePolicy.Policy.Preferred, SizePolicy.Policy.Fixed);
    layout.addWidget(fixedLabel);

    const expandingLabel = new Label(root);
    expandingLabel.text = 'Expanding label fills remaining space';
    expandingLabel.setSizePolicy(SizePolicy.Policy.Expanding, SizePolicy.Policy.Expanding);
    layout.addWidget(expandingLabel);
    Index

    Enumeration Members

    Expanding: number

    Widget actively takes as much space as available.

    Fixed: number

    Widget size is fixed and will not grow or shrink.

    Ignored: number

    Widget size hint is ignored and it takes all available space.

    Maximum: number

    Widget can shrink but prefers its size hint as maximum.

    Minimum: number

    Widget can grow but prefers its minimum size hint.

    MinimumExpanding: number

    Widget can grow and will expand if extra space is available, but prefers its minimum size hint.

    Preferred: number

    Widget uses its size hint as preferred size and can grow or shrink.