OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Constructing and Destroying TToolBox

The syntax of the TToolBox constructor is

TToolBox(TWindow* parent,
int numColumns = 2,
int numRows = AS_MANY_AS_NEEDED,
TTileDirection direction = Horizontal,
TModule* module = 0);

The constructor parameters are described in the following table:

ParameterDescription
parentA pointer to the parent window object.
numColumnsThe number of columns in the tool box.
numRowsThe number of rows in the tool box. direction An enum TTileDirection. There are two possible values for direction, Horizontal or Vertical. If direction is Horizontal, the gadgets are tiled starting at the upper left corner and moving from left to right, going down one row as each row is filled. If direction is Vertical, the gadgets are tiled starting at the upper left corner and moving down, going right one column as each column is filled.
modulePassed as the TModule parameter for the TDialog base constructor. This parameter defaults to 0.

You can specify the constant AS_MANY_AS_NEEDED for either numColumns or numRows, but not both. When you specify AS_MANY_AS_NEEDED for either parameter, the toolbox figures out how many divisions are needed based on the opposite dimension. For example, if you have twenty gadgets and you request four columns, you get five rows.

See Also