Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example displays a check box and left-aligned text in a check box cell.

C++

// Specify a cell
m_Spread.SetCol(2);
m_Spread.SetRow(3);
// Set cell background color
// light gray, RGB(192, 192, 192)
m_Spread.SetBackColor(0x00C0C0C0);
// Define cell type as check box
m_Spread.SetCellType(CellTypeCheckBox);
// Define the check box text
m_Spread.SetTypeCheckText("Completed");
// Align text left of graphic
m_Spread.SetTypeCheckTextAlign(TypeCheckTextAlignLeft);
// Set the column width
m_Spread.SetColWidth(2,10);

Visual Basic

' Specify a cell
fpSpread1.Col = 2
fpSpread1.Row = 3
' Set cell background color
' light gray, RGB(192, 192, 192)
fpSpread1.BackColor = &H00C0C0C0&
' Define cell type as check box
fpSpread1.CellType = CellTypeCheckBox
' Define the check box text
fpSpread1.TypeCheckText = "Completed"
' Align text left of graphic
fpSpread1.TypeCheckTextAlign = TypeCheckTextAlignLeft
' Set the column width
fpSpread1.ColWidth(2) = 10

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