1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
<html>
<head>
<title>EAGLE Help: Layout Information</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>Layout Information</center></h1>
<hr>
All objects within a User Language Dialog a placed inside a <i>layout context</i>.
<p>
Layout contexts can be either <a href=292.htm>grid</a>, <a href=294.htm>horizontal</a>
or <a href=310.htm>vertical</a>.
<p>
<b>Grid Layout Context</b>
<p>
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
<pre>
dlgGridLayout {
dlgCell(5, 2) dlgLabel("Text");
}
</pre>
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
<pre>
dlgGridLayout {
dlgCell(1, 2, 3, 5) dlgGroup("Title") {
//...
}
}
</pre>
<p>
<b>Horizontal Layout Context</b>
<p>
Objects in a horizontal layout context are placed left to right.
<p>
The special objects <a href=304.htm>dlgStretch</a> and <a href=302.htm>dlgSpacing</a>
can be used to further refine the distribution of the available space.
<p>
To define two buttons that are pushed all the way to the right edge of the dialog,
you would write
<pre>
dlgHBoxLayout {
dlgStretch(1);
dlgPushButton("+OK") dlgAccept();
dlgPushButton("Cancel") dlgReject();
}
</pre>
<p>
<b>Vertical Layout Context</b>
<p>
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.
<p>
<b>Mixing Layout Contexts</b>
<p>
Vertical, horizontal and grid layout contexts can be mixed to create the desired layout
structure of a dialog.
See the <a href=318.htm>Complete Example</a> for a demonstration of this.
<hr>
<table width=100% cellspacing=0 border=0><tr><td align=left><font face=Helvetica,Arial>
<a href=index.htm>Index</a>
</font></td><td align=right><font face=Helvetica,Arial size=-1>
<i>Copyright © 2005 CadSoft Computer GmbH</i>
</font></td></tr></table>
<hr>
</font>
</body>
</html>
|