Preparing search index...

    Arranges child layouts and widgets in a grid with rows and columns.

        const root = new Widget(parent);
    const grid = new GridLayout();
    grid.spacing = 6;
    root.layout = grid;

    // Row 0: header spanning 2 columns
    const title = new Label(root);
    title.text = 'Transform';
    title.fontRole = FontRole.TitleBold;
    grid.addWidgetWithSpan(title, 0, 0, 1, 2, Alignment.AlignLeft);

    // Row 1-3: label + button pairs in a grid
    const axes = ['X', 'Y', 'Z'];
    const values = [0, 0, 0];
    const labels: Label[] = [];

    for (static i = 0; i < 3; i++) {
    const axisLabel = new Label(root);
    axisLabel.text = `${axes[i]}:`;
    grid.addWidgetAt(axisLabel, i + 1, 0, Alignment.AlignRight);

    const valLabel = new Label(root);
    valLabel.text = `${values[i]}`;
    valLabel.fontRole = FontRole.Monospace;
    labels.push(valLabel);
    grid.addWidgetAt(valLabel, i + 1, 1, Alignment.AlignLeft);
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    enabled: boolean

    Whether the layout is active and responsive to user input.

    isNull: boolean

    Whether this object references a valid layout.

    spacing: number

    Distance between widgets in the layout.

    Methods

    • Add a layout to the grid at a specific row and column with alignment.

      Parameters

      Returns void

    • Add a widget to the grid at a specific row and column with alignment.

      Parameters

      Returns void

    • Add a widget to the grid spanning multiple rows and columns with alignment.

      Parameters

      • widget: Widget
      • fromRow: number
      • fromColumn: number
      • rowSpan: number
      • columnSpan: number
      • alignment: Alignment

      Returns void

    • Schedule layout for deletion after event processing.

      Returns void

    • Get the minimum width of a column.

      Parameters

      • column: number

      Returns number

    • Get the stretch factor of a column.

      Parameters

      • column: number

      Returns number

    • Get the minimum height of a row.

      Parameters

      • row: number

      Returns number

    • Get the stretch factor of a row.

      Parameters

      • row: number

      Returns number

    • Returns the name of this object's type.

      Returns string

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object refers to the same instance as the given object.

      Parameters

      Returns boolean

    • Set the minimum width of a column.

      Parameters

      • column: number
      • minSize: number

      Returns void

    • Set the stretch factor of a column.

      Parameters

      • column: number
      • stretch: number

      Returns void

    • Set the margins around layout contents.

      Parameters

      • left: number
      • top: number
      • right: number
      • bottom: number

      Returns void

    • Set the minimum height of a row.

      Parameters

      • row: number
      • minSize: number

      Returns void

    • Set the stretch factor of a row.

      Parameters

      • row: number
      • stretch: number

      Returns void