Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example creates a column of edit cells that display only two uppercase, alphabetic characters.

C++

// Specify a cell
m_Spread.SetCol(2);
m_Spread.SetRow(-1);
// Define cell type as edit
m_Spread.SetCellType(CellTypeEdit);
// Display only alphabetic characters
m_Spread.SetTypeEditCharSet(TypeEditCharSetAlpha);
// Display the characters as uppercase only
m_Spread.SetTypeEditCharCase(TypeEditCharCaseSetUpper);
// Display only two characters
m_Spread.SetTypeMaxEditLen(2);
// Set the column width
m_Spread.SetColWidth(2,3);

Visual Basic

' Specify a cell
fpSpread1.Col = 2
fpSpread1.Row = -1
' Define cell type as edit
fpSpread1.CellType = CellTypeEdit
' Display only alphabetic characters
fpSpread1.TypeEditCharSet = TypeEditCharSetAlpha
' Display the characters as uppercase only
fpSpread1.TypeEditCharCase = TypeEditCharCaseSetUpper
' Display only two characters
fpSpread1.TypeMaxEditLen = 2
' Set the column width
fpSpread1.ColWidth(2) = 3

Copyright © GrapeCity, inc. All rights reserved.