TTMSFNCDataGridRenderer.AutoSizeColumn Method
Resizes the given column to the width that fits its cell content.
API unit family: TMSFNCDataGridRenderer
Declaring type: TTMSFNCDataGridRenderer
Syntax
procedure AutoSizeColumn(AColumn: Integer; const AMode: TTMSFNCDataGridAutoSizeMode = gamAllCells; const APadding: Integer = 5);
void __fastcall AutoSizeColumn(int AColumn, const TTMSFNCDataGridAutoSizeMode AMode = (TTMSFNCDataGridAutoSizeMode)(0x1), const int APadding = 0x5);
Remarks
Text is measured on a temporary bitmap canvas inside a BeginUpdate/EndUpdate pair, so the grid repaints once afterwards. Call it after the data is loaded.
Parameters
| Name | Description |
|---|---|
AColumn |
Zero-based column index to resize. |
AMode |
Cells measured: gamAllCells (default) measures every cell of the column, gamVisibleCells only the cells currently on screen, which is faster for large grids. |
APadding |
Extra pixels added to the measured content width. Default 5. |