EAGLE Help

Layout Information


All objects within a User Language Dialog a placed inside a layout context.

Layout contexts can be either grid, horizontal or vertical.

Grid Layout Context

Objects in a grid layout context must specify the grid coordinates of the cell or cells into which they shall be placed. To place a text label at row 5, column 2, you would write

dlgGridLayout {
  dlgCell(5, 2) dlgLabel("Text");
  }
If the object shall span over more than one cell you need to specify the coordinates of the starting cell and the ending cell. To place a group that extends from row 1, column 2 up to row 3, column 5, you would write
dlgGridLayout {
  dlgCell(1, 2, 3, 5) dlgGroup("Title") {
    //...
    }
  }

Horizontal Layout Context

Objects in a horizontal layout context are placed left to right.

The special objects dlgStretch and dlgSpacing can be used to further refine the distribution of the available space.

To define two buttons that are pushed all the way to the right edge of the dialog, you would write

dlgHBoxLayout {
  dlgStretch(1);
  dlgPushButton("+OK")    dlgAccept();
  dlgPushButton("Cancel") dlgReject();
  }

Vertical Layout Context

Objects in a vertical layout context follow the same rules as those in a horizontal layout context, except that they are placed top to bottom.

Mixing Layout Contexts

Vertical, horizontal and grid layout contexts can be mixed to create the desired layout structure of a dialog. See the Complete Example for a demonstration of this.


Index Copyright © 2005 CadSoft Computer GmbH