Spread 8.0 Documentation
SSGetCellType, SSSetCellType, SSSetCellTypeRange Functions
Support Options
DLL Reference > DLL Functions > SSGetCellType, SSSetCellType, SSSetCellTypeRange Functions

Glossary Item Box

SSGetCellType, SSSetCellType, SSSetCellTypeRange Functions


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Set or return the type of data displayed in a cell, a column, a row, a block of cells, or the entire sheet.

Syntax

C

BOOL SSGetCellType(HWND hWnd, SS_COORD Col, SS_COORD Row, LPSS_CELLTYPE lpCellType);

BOOL SSSetCellType(HWND hWnd, SS_COORD Col, SS_COORD Row, LPSS_CELLTYPE lpCellType);

BOOL SSSetCellTypeRange(HWND hWnd, SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, LPSS_CELLTYPE lpCellType);

C++

BOOL TSpread::GetCellType(SS_COORD Col, SS_COORD Row, LPSS_CELLTYPE lpCellType);

BOOL TSpread::SetCellType(SS_COORD Col, SS_COORD Row, LPSS_CELLTYPE lpCellType);

BOOL TSpread::SetCellTypeRange(SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, LPSS_CELLTYPE lpCellType);

Parameters

The following parameters are available:

Parameter Description
hWnd Window handle of the fpSpread control
Col Column number of cell
Row Row number of cell
Col2 Column number of lower-right cell of the block when defining a block for the SSSetCellTypeRange function
Row2 Row number of lower-right cell of the block when defining a block for the SSSetCellTypeRange function
lpCellType Pointer to structure defining cell type

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. To determine the settings you want for the Col, Row, Col2, and Row2 parameters, see Using Column and Row Properties.

Remarks

Use the SSSetCellTypeRange function to set the cell type for a block of cells.

The cell type can be one of the following types:

Type Description
SS_TYPE_BUTTON Button cell
SS_TYPE_CHECKBOX Check box cell
SS_TYPE_COMBOBOX Combo box cell
SS_TYPE_CURRENCY Currency cell
SS_TYPE_CUSTOM Custom cell
SS_TYPE_DATE Date cell
SS_TYPE_EDIT Edit cell
SS_TYPE_NUMBER Number cell
SS_TYPE_OWNERDRAW Owner-drawn cell
SS_TYPE_PERCENT Percent cell
SS_TYPE_PIC PIC cell
SS_TYPE_PICTURE Picture cell
SS_TYPE_SCIENTIFIC Scientific cell
SS_TYPE_STATICTEXT Static text cell
SS_TYPE_TIME Time cell

To specify a cell or cells as a certain type of cell, first use one of the functions listed in the following table, then use the SSSetCellType or SSSetCellTypeRange function to assign the type. You must call one of the following functions first to fill the CellType structure.

Function Sets cell type structure to . . .
SSSetTypeButton Button
SSSetTypeCheckBox Check box
SSSetTypeComboBox Combo box
SSSetTypeComboBoxEx Combo box with a customized drop-down list and a defined maximum number of characters in edit field
SSSetTypeCurrency Currency
SSSetTypeCurrencyEx Currency with formatting options
SSSetTypeCustom Custom cell
SSSetTypeDate Date
SSSetTypeEdit Edit
SSSetTypeNumber Number
SSSetTypeNumberEx Number with formatting options
SSSetTypeOwnerDraw Owner-drawn
SSSetTypePercent Percent
SSSetTypePercentEx Percent with formatting options
SSSetTypePic PIC
SSSetTypePicture Picture
SSSetTypePictureHandle Picture using a picture handle
SSSetTypeScientific Scientific
SSSetTypeStaticText Static text
SSSetTypeTime Time

Note: Each call to the SSSetCellType or SSSetCellTypeRange function must be preceded by a call to one of the SSSetType functions listed in the preceding table. That is, there must be a one-to-one correspondence between the desired SSSetType function and the SSSetCellType or SSSetCellTypeRange function.

Note that the control applies the settings of the cell types as a "package" of settings for each cell type. For more information, see Cell Type Settings Remembered.

Return Value

TRUE if the function completes successfully; FALSE otherwise.

See Also

Cell Type Settings Remembered
Setting the Cell Type

SSSetSheet, SSSetTypeButton, SSSetTypeCheckBox, SSSetTypeComboBox, SSSetTypeComboBoxEx, SSSetTypeCurrency, SSSetTypeCurrencyEx, SSSetTypeDate, SSSetTypeEdit, SSSetTypeNumber, SSSetTypeNumberEx, SSSetTypeOwnerDraw, SSSetTypePercent, SSSetTypePercentEx, SSSetTypePic, SSSetTypePicture, SSSetTypePictureHandle, SSSetTypeScientific, SSSetTypeStaticText, SSSetTypeTime functions
ActiveX Correspondence

CellType property

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