Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example provides text for a static cell, sets the text to wrap to multiple lines, aligns the text horizontally and vertically, and sets the width and height of the row and column containing that cell.

C++

// Specify a cell
m_Spread.SetCol(2);
m_Spread.SetRow(3);
// Define cell type as static
m_Spread.SetCellType(CellTypeStaticText);
// Provide text for the specified cell
m_Spread.SetText("Select one of the following");
// Set the text to wrap to multiple lines
m_Spread.SetTypeTextWordWrap(TRUE);
// Set vertical alignment to center
m_Spread.SetTypeVAlign(TypeVAlignCenter);
// Set horizontal alignment to center
m_Spread.SetTypeHAlign(TypeHAlignCenter);
// Set row height of specified row
m_Spread.SetRowHeight(3,38);
// Set column width of specified column
m_Spread.SetColWidth(2,9);

Visual Basic

' Specify a cell
fpSpread1.Col = 2
fpSpread1.Row = 3
' Define cell type as static
fpSpread1.CellType = CellTypeStaticText
' Provide text for the specified cell
fpSpread1.Text = "Select one of the following"
' Set the text to wrap to multiple lines
fpSpread1.TypeTextWordWrap = True
' Set vertical alignment to center
fpSpread1.TypeVAlign = TypeVAlignCenter
' Set horizontal alignment to center
fpSpread1.TypeHAlign = TypeHAlignCenter
' Set row height of specified row
fpSpread1.RowHeight(3) = 38
' Set column width of specified column
fpSpread1.ColWidth(2) = 9

Copyright © GrapeCity, inc. All rights reserved.