Skip to main content

TdxSpreadSheetTableViewOptions.DefaultColumnWidth Property

Specifies the default column width in a Table View worksheet.

Declaration

property DefaultColumnWidth: Integer read; write;

Property Value

Type
Integer

Remarks

Use the DefaultColumnWidth and DefaultRowHeight properties to change the default cell dimensions in a worksheet. These property values correspond to a cell size in pixels only if the worksheet’s Options.ZoomFactor property is set to 100 (real size).

The worksheet’s look and feel corresponding to the default DefaultColumnWidth property value is displayed below:

The following code example sets custom column widths for two worksheets in the current spreadsheet document:

//...
// Cast the objects returned by the control's Sheets property to the TdxSpreadSheetTableView class to access the DefaultColumnWidth property.
  TdxSpreadSheetTableView(dxSpreadSheet1.Sheets[0]).Options.DefaultColumnWidth := 50;
  TdxSpreadSheetTableView(dxSpreadSheet1.Sheets[1]).Options.DefaultColumnWidth := 100;

The DefaultColumnWidth property automatically updates by multiplying its current value by the form’s scaling factor every time it changes.

The default value of the DefaultColumnWidth property is dxSpreadSheetDefaultColumnWidth.

See Also