Table of Contents

TTMSFNCDataGridCore.StretchColumns Method

Redistributes column widths to fill the available control width.

API unit family: TMSFNCDataGridCore Declaring type: TTMSFNCDataGridCore

Syntax

function StretchColumns(AMode: TTMSFNCDataGridStretchingMode = gstmAll; ARange: TTMSFNCDataGridStretchingRange = gstrNormal; AIndex: Integer = -1; ANewWidth: Double = -1): Boolean;

Parameters

Name Description
AMode Which columns to resize: a single index (gstmIndex), all equally (gstmAll), or proportionally (gstmProportional).
ARange Whether to include hidden columns in the calculation (gstrAll) or only visible ones (gstrNormal).
AIndex Target column when AMode = gstmIndex; ignored otherwise.
ANewWidth Explicit target width in pixels; pass -1 to auto-fill the control width.

Returns

True when at least one column width changed.