Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example defines a block of cells as currency cells, sets the currency characters, sets edit mode to remain on when moving between cells, and to have text appended during edit mode.

C++

// Select a block of cells
m_Spread.SetCol(2);
m_Spread.SetCol2(4);
m_Spread.SetRow(2);
m_Spread.SetRow2(6);
// Turn block mode on
m_Spread.SetBlockMode(TRUE);
// Define cells type as currency
m_Spread.SetCellType(CellTypeCurrency);
// Define currency settings
// Set the currency character
m_Spread.SetTypeCurrencySymbol("68");
// Set the decimal character
m_Spread.SetTypeCurrencyDecimal("44");
// Set the separator character
m_Spread.SetTypeCurrencySeparator("46");
// Specify that cells display a currency character
m_Spread.SetTypeCurrencyShowSymbol(TRUE);
// Specify that cells display a separator character
m_Spread.SetTypeCurrencyShowSep(TRUE);
// Turn block mode off
m_Spread.SetBlockMode(FALSE);
// Set edit mode to remain on when switching between cells
m_Spread.SetEditModePermanent(TRUE);

// Specify text be appended during edit mode
m_Spread.SetEditModeReplace(FALSE);

Visual Basic

' Select a block of cells
fpSpread1.Col = 2
fpSpread1.Col2 = 4
fpSpread1.Row = 2
fpSpread1.Row2 = 6
' Turn block mode on
fpSpread1.BlockMode = True
' Define cells type as currency
fpSpread1.CellType = CellTypeCurrency
' Define currency settings
' Set the currency character
fpSpread1.TypeCurrencySymbol = "D"
' Set the decimal character
fpSpread1.TypeCurrencyDecimal = ","
' Set the separator character
fpSpread1.TypeCurrencySeparator = "."
' Specify that cells display a currency character
fpSpread1.TypeCurrencyShowSymbol = True
' Specify that cells display a separator character
fpSpread1.TypeCurrencyShowSep = True
' Turn block mode off
fpSpread1.BlockMode = False

' Set edit mode to remain on when switching between cells
fpSpread1.EditModePermanent = True

' Specify text be appended during edit mode
fpSpread1.EditModeReplace = False

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