TTMSFNCDataGridCore.StretchRows Method
Resizes rows so that together they fill the available height.
API unit family: TMSFNCDataGridCore
Declaring type: TTMSFNCDataGridCore
Syntax
function StretchRows(AMode: TTMSFNCDataGridStretchingMode = gstmAll; ARange: TTMSFNCDataGridStretchingRange = gstrNormal; AIndex: Integer = -1; ANewHeight: Double = -1): Boolean;
bool __fastcall StretchRows(TTMSFNCDataGridStretchingMode AMode = (TTMSFNCDataGridStretchingMode)(0x1), TTMSFNCDataGridStretchingRange ARange = (TTMSFNCDataGridStretchingRange)(0x0), int AIndex = 0xffffffff, double ANewHeight = -1.000000E+00);
Remarks
Heights are assigned through RowHeights inside a BeginUpdate/EndUpdate pair.
Parameters
| Name | Description |
|---|---|
AMode |
How the space is divided: to one row (gstmIndex), equally (gstmAll, default), or in proportion to the current heights (gstmProportional). |
ARange |
With gstrNormal (default) only the scrollable rows are resized and the fixed top/bottom row heights are subtracted from the available height; with gstrAll the fixed rows are resized too. Hidden and filtered rows are always skipped. |
AIndex |
Row that receives the remaining height when AMode = gstmIndex; -1 (default) selects the last non-hidden row in the range. Ignored for the other modes. |
ANewHeight |
Total height to fill, in pixels; -1 (default) uses the height of the content rectangle of the control. |
Returns
True when new heights were applied; False when there is no shown row in the range, the available height is negative, or (for gstmIndex) the target row cannot receive a positive height.