Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example creates an edit cell that centers text, displays typed text as asterisks, appearing as a password field, and limits users to typing no more than 10 characters.

C++

// Specify a cell
m_Spread.SetCol(2);
m_Spread.SetRow(3);
// Define cell type as edit
m_Spread.SetCellType(CellTypeEdit);
// Set the characters to display as asterisks
m_Spread.SetTypeEditPassword(TRUE);
// Display up to 10 characters
m_Spread.SetTypeMaxEditLen(10);
// Center the text
m_Spread.SetTypeHAlign(TypeHAlignCenter);

Visual Basic

' Specify a cell
fpSpread1.Col = 2
fpSpread1.Row = 3
' Define cell type as edit
fpSpread1.CellType = CellTypeEdit
' Set the characters to display as asterisks
fpSpread1.TypeEditPassword = True

' Display up to 10 characters
fpSpread1.TypeMaxEditLen = 10
' Center the text
fpSpread1.TypeHAlign = TypeHAlignCenter

Copyright © GrapeCity, inc. All rights reserved.