Spread 8.0 Documentation
SSGetColHeaderRows, SSSetColHeaderRows Functions
Support Options
DLL Reference > DLL Functions > SSGetColHeaderRows, SSSetColHeaderRows Functions

Glossary Item Box

SSGetColHeaderRows, SSSetColHeaderRows Functions


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Set or return the number of rows displayed as the column header.

Syntax

C

SS_COORD SSGetColHeaderRows(HWND hWnd);

void SSSetColHeaderRows(HWND hWnd, SS_COORD lHeaderRows);

C++

SS_COORD TSpread::GetColHeaderRows( );

void TSpread::SetColHeaderRows(SS_COORD lColHeaderRows);

Parameters

The SSGetColHeaderRows and SSSetColHeaderRows functions have the following parameters:

Parameter Description
hWnd Window handle of the fpSpread control
lHeaderRows Number of column header rows

Remarks

This function is applied to the current sheet setting unless you first call the SSSetSheet function to specify the sheet for which you are calling this function.

The default number of header rows is 1 row. The minimum value you can set for the lHeaderRows parameter is 1. The maximum value you can set for the lHeaderRows parameter is 255.

When you set the lHeaderRows parameter to a value greater than 1, additional rows are added to the column header, as shown in the following figure, where the parameter 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 calling the SSSetShadowColor function, but the additional rows are blank by default. Call the SSSetData function to add content to the additional rows. The bottom-most header row displays the auto text, as specified by calling the SSSetColHeaderDisplay function. You can have another row display the auto text by calling the SSSetColHeadersAutoTextIndex function.

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, SS_HEADER. The first row in the column header is SS_HEADER, the second row is SS_HEADER + 1, the third row is SS_HEADER + 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 by calling the SSGetColFromID function, the function returns the value 0.

Call the SSSetColHeaderRows property to specify the number of rows used for the column header. Call the SSSetMaxRows property to specify the number of non-header rows.

This function does not have an effect unless the SSB_SHOWCOLHEADERS boolean for the SSSetBool function is set to TRUE and the column header rows are not hidden.

Call the SSSetRowHeaderCols function to specify the number of columns to display as the row header.

Return Value

SSGetColHeaderRows: Number of column header rows

See Also

Providing Multiple Headers

SSGetColHeaderDisplay, SSGetColHeadersAutoTextIndex, SSGetColHeadersUserSortIndex, SSGetRowHeaderCols, SSSetBool, SSSetColHeaderDisplay, SSSetColHeadersAutoTextIndex, SSSetColHeadersUserSortIndex, SSSetRowHeaderCols, SSSetSheet functions

ActiveX Correspondence

ColHeaderRows property

Copyright © GrapeCity, inc. All rights reserved.