[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Gets the effective width for the column.
Source position: dbgrids.pas line 278
protected function TColumn.GetDefaultWidth: Integer; override; |
Effective width for the column.
GetDefaultWidth is an overridden Integer function used to get the effective width for the column. The return value is calculated using the Grid and its Canvas to find the space needed for the Field in the column. When the Grid has Options that include the value dgTitles, Title.Caption and Title.Font are included in the calculation. GetDefaultWidth calls the CalcColumnFieldWidth function to get the canvas width used as the return value.
The return value is -1 if the Grid has not been assigned for the column. The return value contains Grid.DefaultColWidth when Field has not been assigned in the column.
Version 4.0 | Generated 2025-05-03 | Home |