Appendix C: Layout hints

The layout managers in the ABAQUS GUI Toolkit support the following layout hints:


Layout hintUsed inEffect
LAYOUT_SIDE_TOP (default) LAYOUT_SIDE_BOTTOM LAYOUT_SIDE_LEFT LAYOUT_SIDE_RIGHTFXPacker FXGroupBox FXTopLevel If you specify one of these four layout hints, the child widget will be stuck to the top, bottom, left, or right, respectively, in the layout manager cavity. The size of the cavity will be reduced by the amount lopped off by the packed widget. LAYOUT_SIDE_TOP and LAYOUT_SIDE_BOTTOM will reduce the height of the cavity. LAYOUT_SIDE_LEFT and LAYOUT_SIDE_RIGHT will reduce the width of the cavity. For other composite widgets, these hints may not have any effect.
LAYOUT_LEFT (default) LAYOUT_RIGHTAllThe widget will be placed on the left side or right side of the space remaining in the container. When used for a child of FXPacker FXGroupBox, or FXTopLevel, the hint will be ignored unless either LAYOUT_SIDE_TOP or LAYOUT_SIDE_BOTTOM is specified.
LAYOUT_TOP (default) LAYOUT_BOTTOM AllThe widget will be placed on the top-side or bottom-side of the space remaining in the container. For a child of FXPacker, etc., these options will only have effect if either LAYOUT_SIDE_RIGHT or LAYOUT_SIDE_LEFT is specified.
LAYOUT_CENTER_X LAYOUT_CENTER_YAllThe widget will be centered in the X-direction (or Y-direction) in the parent. Extra spacing will be added around the widget to place it at the center of the space available to it. The size of the widget will be its default size unless LAYOUT_FIX_WIDTH or LAYOUT_FIX_HEIGHT have been specified.
LAYOUT_FILL_X LAYOUT_FILL_YAllEither none, one, or both of these hints may be specified. LAYOUT_FILL_X will cause the parent layout manager to stretch or shrink the widget to accommodate the available space. If more than one child with this option is placed side by side, the available space will be subdivided proportionally to their default size. LAYOUT_FILL_Y has the identical effect on the vertical direction.
LAYOUT_FIX_X LAYOUT_FIX_YAllEither none, one, or both of these hints may be specified. The LAYOUT_FIX_X hint will cause the parent layout manager to place this widget at the indicated X-position, as passed on the optional arguments in the widgets constructor argument list. Likewise, a LAYOUT_FIX_Y hint will cause placement at the indicated Y-position. The X- and Y-positions are specified in the parent's coordinate system.
LAYOUT_FILL_ROW LAYOUT_FILL_COLUMNFXMatrix If LAYOUT_FILL_COLUMN is specified for all child widgets in a certain column of a matrix layout manager, the whole column can stretch if the matrix itself is stretched horizontally. Analogously, if LAYOUT_FILL_ROW is specified for all child widgets in a certain row, the whole row is stretched if the matrix layout manager is stretched vertically.
LAYOUT_FIX_WIDTH LAYOUT_FIX_HEIGHTAllThese options will fix the widget's width (or height) to the value specified on the constructor. You can change the size of the widget using its setWidth() and setHeight() methods; however, the layout manager will generally observe the specified dimensions of the widget without trying to modify it (unless other options override).
LAYOUT_MIN_WIDTH (default) LAYOUT_MIN_HEIGHT (default)AllEither none, one, or both of these hints may be specified. You will almost never specify these options, except perhaps for code legibility. If LAYOUT_FIX_WIDTH or LAYOUT_FIX_HEIGHT are not specified, these options will cause the parent layout widget to use the default (or minimum) width and height, respectively.