Example
The following example hides the grid lines in the sheet, displays solid blue borders around two cells, and lets data in cells overflow into adjacent, empty cells.
C++
// Hide the horizontal and vertical grid lines
m_Spread1.SetGridShowHoriz(FALSE);
m_Spread1.SetGridShowVert(FALSE);
// Set a cell border on the top, bottom,
// and left side of cell B2
m_Spread1.SetCellBorder(2, 2, 2, 2, CellBorderIndexLeft, RGB(0,0,255), CellBorderStyleSolid);
m_Spread1.SetCellBorder(2, 2, 2, 2, CellBorderIndexTop, RGB(0,0,255), CellBorderStyleSolid);
m_Spread1.SetCellBorder(2, 2, 2, 2, CellBorderIndexBottom, RGB(0,0,255), CellBorderStyleSolid);
// Set a cell border on the top, bottom,
// and right side of cell C2
m_Spread1.SetCellBorder(3, 2, 3, 2, CellBorderIndexRight, RGB(0,0,255), CellBorderStyleSolid);
m_Spread1.SetCellBorder(3, 2, 3, 2, CellBorderIndexTop, RGB(0,0,255), CellBorderStyleSolid);
m_Spread1.SetCellBorder(3, 2, 3, 2, CellBorderIndexBottom, RGB(0,0,255), CellBorderStyleSolid);
// Set the text to overflow to adjacent empty cells
m_Spread1.SetAllowCellOverflow(TRUE);
// Provide text
m_Spread1.SetText(2,2,CComVariant(_T("ADZ Racing Supplies")));
Visual Basic
' Hide the horizontal and vertical grid lines
fpSpread1.GridShowHoriz = False
fpSpread1.GridShowVert = False
' Set a cell border on the top, bottom,
' and left side of cell B2
fpSpread1.SetCellBorder 2, 2, 2, 2, 1, &H800000, CellBorderStyleSolid
fpSpread1.SetCellBorder 2, 2, 2, 2, 4, &H800000, CellBorderStyleSolid
fpSpread1.SetCellBorder 2, 2, 2, 2, 8, &H800000, CellBorderStyleSolid
' Set a cell border on the top, bottom,
' and right side of cell C2
fpSpread1.SetCellBorder 3, 2, 3, 2, 2, &H800000, CellBorderStyleSolid
fpSpread1.SetCellBorder 3, 2, 3, 2, 4, &H800000, CellBorderStyleSolid
fpSpread1.SetCellBorder 3, 2, 3, 2, 8, &H800000, CellBorderStyleSolid
' Set the text to overflow to adjacent empty cells
fpSpread1.AllowCellOverflow = True
' Provide text
fpSpread1.Col = 2
fpSpread1.Row = 2
fpSpread1.Text = "ADZ Racing Supplies"