Vcl.DBGrids.TColumn.DefaultWidth

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function  DefaultWidth: Integer;

C++

int __fastcall DefaultWidth();

Properties

Type Visibility Source Unit Parent
function public
Vcl.DbGrids.pas
Vcl.DBGrids.hpp
Vcl.DBGrids TColumn

Description

Returns the default width for the column.

The value of DefaultWidth is determined as follows:

If the column has no data grid associated with it, DefaultWidth returns 64.

If the column has an associated data grid but the Field property is empty, DefaultWidth returns data grid's protected DefaultColWidth property. Usually, this value is 64.

If the column has an associated data field, DefaultWidth is calculated from the TField object's DisplayWidth property using the column's font.

If the dgTitles flag is set in the data grid's Options property, DefaultWidth is increased (as necessary) to accommodate the column's title caption.

See Also