bOk = MTblAutoSizeRows( hWndTbl, nFlags )

When MTBL_FLAG_VARIABLE_ROW_HEIGHT is set:
Adjusts the heights of rows according to their highest contents.


When MTBL_FLAG_VARIABLE_ROW_HEIGHT is not set:
Adjusts the number of lines per row according to the row which has the highest contents.

Parameters
hWndTbl
Window Handle: Handle of the table

nFlags
Number: Optional flags:

MTASR_ALLROWS

When MTBL_FLAG_VARIABLE_ROW_HEIGHT is set:

The heights of all ( currently fetched ) rows are adjusted.

If this flag is not set, only the height of the currently visible rows are adjusted.


When MTBL_FLAG_VARIABLE_ROW_HEIGHT is not set:

All ( currently fetched ) rows are used to determine the best number of lines per row.
If this flag is not set, only the rows in the visible range are used.

MTASR_BTNSPACE

The heights of M!Table buttons are considered.

MTASR_CONTEXTROW_ONLY

When MTBL_FLAG_VARIABLE_ROW_HEIGHT is set:

Only the height of the current context row is adjusted.

If the context row is merged with other rows, the heights of all merged rows are adjusted.


When MTBL_FLAG_VARIABLE_ROW_HEIGHT is not set:

Only the current context row is used to determine the best number of lines per row.

If the context row is merged with other rows, all merged rows are used to determine the best number of lines per row.

MTASR_HIDDENCOLS

Hidden columns are also used to determine the best height and/or number of lines per row.
If this flag is not set, only the visible columns are used.

MTASR_HIDDENROWS

When MTBL_FLAG_VARIABLE_ROW_HEIGHT is set:

The heights of hidden rows are also adjusted.

If this flag is not set, only the heights of visible rows are adjusted.


When MTBL_FLAG_VARIABLE_ROW_HEIGHT is not set:

Hidden rows are also used to determine the best number of lines per row.
If this flag is not set, only the visible rows are used.

MTASR_INCREASE_ONLY

When MTBL_FLAG_VARIABLE_ROW_HEIGHT is set:

The height of a row is only adjusted when the calculated height exceeds the current height.


When MTBL_FLAG_VARIABLE_ROW_HEIGHT is not set:

The number of lines per row is only adjusted when the calculated best number of lines per row exceeds the current number of lines per row.

MTASR_SPLITROWS

When MTBL_FLAG_VARIABLE_ROW_HEIGHT is set:

The heights of split rows are also adjusted.


When MTBL_FLAG_VARIABLE_ROW_HEIGHT is not set:

Split rows are also used to determine the best number of lines.

Return
Boolean: TRUE if successful or FALSE if an error occurs

Example
In this example the number of lines per row is adjusted using all visible normal and split rows:

Call MTblAutoSizeRows( hWndForm, MTASR_ALLROWS | MTASR_SPLITROWS )

See also
Automatic row sizing
Automatic column sizing
Row merging
Variable row height
MTBL_FLAG_VARIABLE_ROW_HEIGHT

Created with the Personal Edition of HelpNDoc: Create cross-platform Qt Help files