Spread 8.0 Documentation
MaxCols Property
Support Options
ActiveX Reference > ActiveX Properties > MaxCols Property

Glossary Item Box

MaxCols Property


See Also    DLL    Example

Applies To

fpSpread control

Description

Sets or returns the number of columns in the sheet.

Syntax

C++

long CSpreadSheet::GetMaxCols( );
void CSpreadSheet::SetMaxCols(long value);

Visual Basic

[form.]fpSpread.MaxCols[ = value&]

Remarks

The default value for the MaxCols property is 500. The maximum number of available columns is two billion.

This setting is applied to the current sheet setting unless you first set the Sheet property to specify the sheet for which you are setting the property.

You can return the column number of the last column that contains data using the DataColCnt property.

To increase the maximum number of columns when a column is inserted, first use the MaxCols property to increment the maximum number of columns by one, then use the InsertCols method to insert the column.

A gray area appears to the right of the last column in the sheet, between the sheet and the fpSpread control. You can set the color of this gray area using the GrayAreaBackColor property.

Note: When you load a file into the sheet, the settings for the MaxCols and MaxRows properties change to the number of columns and rows in the loaded file.For more information about loading files into the fpSpread control, see Adding Data.

Spread Designer

Choose the Sheet menu, then the Columns and Rows menu, select the Columns tab, and then type a number in the Max Cols edit box in the Settings-All Columns group box in the Column and Row Settings dialog box.

Data Type

Long Integer

See Also

Setting the Maximum Number of Columns and Rows

DataColCnt, GrayAreaBackColor, MaxRows, Sheet properties

InsertCols method

DLL Correspondence

SSGetMaxCols, SSSetMaxCols functions

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.