Spread 8.0 Documentation
GetCellBorder Method
Support Options
ActiveX Reference > ActiveX Methods > GetCellBorder Method

Glossary Item Box

GetCellBorder Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Returns the color and style of the border around a cell.

Syntax

C++

void CSpreadSheet::GetCellBorder(long lCol, long lRow, long nIndex, VARIANT* pcrColor, VARIANT* pnStyle);

Visual Basic

fpSpread1.GetCellBorder(ByVal lCol As Long, ByVal lRow As Long, ByVal nIndex As Long, pcrColor As Variant, pnStyle As Variant)

Parameters

The following parameters are available:

Parameter Description
lCol Column coordinate of the cell
lRow Row coordinate of the cell
nIndex Part of cell border to customize
You can combine values 1 (Left), 2 (Right), 4 (Top), and 8 (Bottom) using the OR operator.
Value Constant Description
0 (not available) None
1 CellBorderIndexLeft Left side of cell
2 CellBorderIndexRight Right side of cell
4 CellBorderIndexTop Top of cell
8 CellBorderIndexBottom Bottom of cell
15 (not available) All sides of the cell
16 CellBorderIndexOutline Outline of the cell range
pcrColor Border color
Value can be SPRD_COLOR_DEFAULT (–1), which specifies the default color.
pnStyle Border style (see Remarks for illustration of styles)
Can be one of the following values:
Value Constant Description
0 CellBorderStyleDefault No border
Displays the default grid
1 CellBorderStyleSolid Solid border
2 CellBorderStyleDash Dash border
3 CellBorderStyleDot Dot border
4 CellBorderStyleDashDot Dash dot border
5 CellBorderStyleDashDotDot Dash dot dot border
6 CellBorderStyleBlank Erases border and grid
11 CellBorderStyleFineSolid Fine solid border
12 CellBorderStyleFineDash Fine dash border
13 CellBorderStyleFineDot Fine dot border
14 CellBorderStyleFineDashDot Fine dash dot border
15 CellBorderStyleFineDashDotDot Fine dash dot dot border

Remarks

For cells with different border settings, use the Index parameter to return the setting for each side separately.

This method is called for the current sheet setting unless you first set the Sheet property to specify the sheet with which you want to work.

Use the SetCellBorder method to apply different border styles, colors, and widths to each side of a cell.

The following table illustrates the twelve available border styles:

Default

Solid

Dash

Dot

Dash Dot

Dash Dot Dot

Blank

Fine Solid

Fine Dash

Fine Dot

Fine Dash Dot

Fine Dash Dot Dot

Return Type

None

See Also

Customizing Cell Borders

Sheet property

SetCellBorder method

DLL Correspondence

SSGetBorder, SSGetBorderEx functions

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