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

Glossary Item Box

ColHeaderRows Property


See Also    DLL    Example

Applies To

fpSpread control

Description

Sets or returns the number of rows displayed as the column header.

Syntax

C++

long CSpreadSheet::GetColHeaderRows( );
void CSpreadSheet::SetColHeaderRows(long value);

Visual Basic

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

Remarks

The default value for the ColHeaderRows property is 1 row. The minimum value you can set for the ColHeaderRows property is 1. The maximum value you can set for the ColHeaderRows property is 255.

When you set the ColHeaderRows property to a value greater than 1, additional rows are added to the column header, as shown in the following figure, where the ColHeaderRows property is set to 3.

Tip: If the control displays multiple header rows such that the column headers fill the entire view of the sheet, users cannot scroll to the data portion of the sheet. Keep this in mind when sizing the control and adding multiple column header rows.

The added rows display the column header appearance: the background, text, and border colors are displayed as specified by the ShadowColor, ShadowText, and ShadowDark properties, but the additional rows are blank by default. Use the Text property to add content to the additional rows. The bottom-most header row displays the auto text, as specified by the ColHeadersAutoText property. You can have another header row display the auto text by setting the ColHeadersAutoTextIndex property.

Cell coordinates for the column and row headers are separate from cell coordinates in the content area. Row numbers in the column header are based on a constant, SpreadHeader. The first row in the column header is SpreadHeader, the second row is SpreadHeader + 1, the third row is SpreadHeader + 2, and so forth, as shown in the following figure.

Note: Returned column values will use a 0 to indicate the column or row header, to provide backward compatibility with previous versions of Spread. For example, if you return the column number for the row header column using the GetColFromID method, the method returns the value 0.

Use the ColHeaderRows property to specify the number of rows used for the column header. Use the MaxRows property to specify the number of non-header rows.

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.

This property does not have an effect unless the ColHeadersShow property is set to True and the column header rows are not hidden.

Set the RowHeaderCols property to specify the number of columns to display as the row header.

Spread Designer

Choose the Sheet menu, then the Headers menu, and then the General menu, select the Columns tab, and then choose or type a number in the Column Header Rows spin box in the Header Settings dialog box.

Data Type

Long Integer

See Also

Providing Multiple Headers

ColHeadersAutoText, ColHeadersAutoTextIndex, ColHeadersShow, MaxRows, RowHeaderCols, ShadowColor, ShadowDark, ShadowText, Sheet, Text properties

DLL Correspondence

SSGetColHeaderRows, SSSetColHeaderRows functions

Copyright © GrapeCity, inc. All rights reserved.