OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Layout Constraints

Layout constraints specify a relationship between an edge or dimension of one window and an edge or dimension of a sibling window or the parent layout window.

This relationship can be quite flexible. For example, you can set the width of a window to be a percentage of the width of the parent window, so that whenever the parent is resized, the child window is resized to take up the same relative window area. You can also set the left edge of a window to be the same as the right edge of another child, so that when the windows are moved around, they are tied together. You can even constrain a window to occupy an absolute size and position in the client area.

The three types of constraints most often used are TEdgeConstraint, TEdgeOrWidthConstraint, and TEdgeOrHeightConstraint. These structures constitute the full set of constraints used in the TLayoutMetrics. TEdgeOrWidthConstraint and TEdgeOrHeightConstraint are derived from TEdgeConstraint. From the outside, these three objects look almost the same. Discussions of TEdgeConstraint refer to all three objects-TEdgeConstraint, TEdgeOrWidthConstraint, and TEdgeOrHeightConstraint-unless the other two classes are explicitly excluded from a statement.

See Also