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

Glossary Item Box

CellType Property


See Also    DLL    Example

Applies To

fpSpread control

Description

Sets or returns the type of data displayed in a portion of or the entire sheet. This property is available at run time only.

Syntax

C++

long CSpreadSheet::GetCellType( );
void CSpreadSheet::SetCellType(long value);

Visual Basic

[form.]fpSpread.CellType[ = setting%]

Remarks

The following settings are available:

Setting Description Constant
0 - Date Creates date cell CellTypeDate
1 - Edit (Default) Creates edit cell CellTypeEdit
4 - PIC Creates PIC cell CellTypePic
5 - Static Text Creates static text cell CellTypeStaticText
6 - Time Creates time cell CellTypeTime
7 - Button Creates button cell CellTypeButton
8 - Combo Box Creates combo box cell CellTypeComboBox
9 - Picture Creates picture cell CellTypePicture
10 - Check Box Creates check box cell CellTypeCheckBox
11 - Owner-Drawn Creates owner-drawn cell CellTypeOwnerDrawn
12 - Currency Creates currency cell CellTypeCurrency
13 - Number Creates numeric cell CellTypeNumber
14 - Percent Creates percent cell CellTypePercent
15 - Scientific Creates scientific cell CellTypeScientific
16 - Custom Creates custom cell CellTypeCustom

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. Before specifying the cell type, specify the cell or cells to which to apply the type, as described in Using Column and Row Properties.

If you are binding the sheet to a database, the cell types are automatically assigned based on the data in the database. To learn more about this assignment and about how to override assigned cell types, see Assigning Cell Types for Bound Sheets.

Note: If your sheet contains numeric data and you are planning to export the sheet to Excel, for best results place any numeric data in a currency, number, or percent cell in Spread.

Once you specify the cell type, you can set the properties associated with that type, as listed in the following table.

TypeButtonAlign TypeButtonBorderColor TypeButtonColor
TypeButtonDarkColor TypeButtonLightColor TypeButtonPicture
TypeButtonPictureDown TypeButtonShadowSize TypeButtonText
TypeButtonTextColor TypeButtonType TypeCheckCenter
TypeCheckPicture TypeCheckText TypeCheckTextAlign
TypeCheckType TypeComboBoxAutoSearch TypeComboBoxCount
TypeComboBoxCurSel TypeComboBoxEditable TypeComboBoxIndex
TypeComboBoxList TypeComboBoxMaxDrop TypeComboBoxString
TypeComboBoxWidth TypeCurrencyDecimal TypeCurrencyDecPlaces
TypeCurrencyLeadingZero TypeCurrencyMax TypeCurrencyMin
TypeCurrencyNegStyle TypeCurrencyPosStyle TypeCurrencySeparator
TypeCurrencyShowSep TypeCurrencyShowSymbol TypeCurrencySymbol
TypeCustomItemData TypeCustomName TypeCustomStyle
TypeDateCentury TypeDateFormat TypeDateMax
TypeDateMin TypeDateSeparator TypeEditCharCase
TypeEditCharSet TypeEditMultiLine TypeEditPassword
TypeHAlign TypeMaxEditLen TypeNegRed
TypeNumberDecimal TypeNumberDecPlaces TypeNumberLeadingZero
TypeNumberMax TypeNumberMin TypeNumberNegStyle
TypeNumberSeparator TypeNumberShowSep TypeOwnerDrawStyle
TypePercentDecimal TypePercentDecPlaces TypePercentLeadingZero
TypePercentMax TypePercentMin TypePercentNegStyle
TypePicDefaultText TypePicMask TypePictCenter
TypePictMaintainScale TypePictPicture TypePictStretch
TypeScientificDecimal TypeScientificDecPlaces TypeScientificMax
TypeScientificMin TypeSpin TypeSpinInc
TypeSpinWrap TypeTextOrient TypeTextPrefix
TypeTextShadow TypeTextShadowIn TypeTextWordWrap
TypeTime24Hour TypeTimeMax TypeTimeMin
TypeTimeSeconds TypeTimeSeparator TypeVAlign

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

Spread Designer

Specify the portion of the sheet to which to apply the border type using the instructions in Selecting an Item in Spread Designer. Then choose Cell Type from the Cell menu, and select an item in the Cell Type drop-down list box in the Cell Type dialog box. Once you specify the cell type, you can set the properties associated with that type on the Settings tab in the Cell Type dialog box.

Data Type

Integer (Enumerated)

See Also

Cell Type Settings Remembered
Setting the Cell Type
Assigning Cell Types for Bound Sheets

DAutoCellTypes, Sheet properties

DataColConfig event

DLL Correspondence

SSGetCellType, SSSetCellType, SSSetCellTypeRange functions

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