Spread ASP.NET 6.0 Product Documentation
BorderSizeTop Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > Border Class : BorderSizeTop Property


Glossary Item Box

Gets or sets the width in pixels of the top border.

Syntax

Visual Basic (Declaration) 
Public Property BorderSizeTop As Integer
Visual Basic (Usage)Copy Code
Dim instance As Border
Dim value As Integer
 
instance.BorderSizeTop = value
 
value = instance.BorderSizeTop
C# 
public int BorderSizeTop {get; set;}

Property Value

Integer number of pixels of the thickness of the top border

Remarks

If you want to set the borders for all sides of the object to the same size, use the BorderSize property.

To check if other border size properties have been set, use the IsDefined method.

Example

This example creates a spreadsheet with 7 columns and 50 rows. It sets the first column of cells to be currency cells with a BorderStyle of double-line border. The top and left sides of the cells have a blue border that is 5 pixels thick and 8 pixels thick respectively.
C#Copy Code
FarPoint.Web.Spread.CurrencyCellType currcell = new FarPoint.Web.Spread.CurrencyCellType();
FarPoint.Web.Spread.Border aborder = new FarPoint.Web.Spread.Border();
FarPoint.Web.Spread.StyleInfo currstyle = new FarPoint.Web.Spread.StyleInfo();
FpSpread1.Sheets[0].ColumnCount = 7;
FpSpread1.Sheets[0].RowCount = 50;
currcell.Size = 20;
aborder.BorderColorBottom = Color.Blue;
aborder.BorderColorLeft = Color.Blue;
aborder.BorderSize = 5;
aborder.BorderStyleBottom = BorderStyle.Double;
aborder.BorderStyleLeft = BorderStyle.Double;
aborder.BorderStyleRight = BorderStyle.Groove;
aborder.BorderStyleTop = BorderStyle.Groove;
currstyle.CellType = currcell;
currstyle.Border = aborder;
FpSpread1.Sheets[0].SetStyleInfo(-1, 0, currstyle);
Visual BasicCopy Code
Dim currcell As New FarPoint.Web.Spread.CurrencyCellType()
Dim aborder As New FarPoint.Web.Spread.Border()
Dim currstyle As New FarPoint.Web.Spread.StyleInfo()
FpSpread1.Sheets(0).ColumnCount = 7
FpSpread1.Sheets(0).RowCount = 50
currcell.Size = 20
aborder.BorderColorBottom = Color.Blue
aborder.BorderColorLeft = Color.Blue
aborder.BorderSize = 5
aborder.BorderStyleBottom = BorderStyle.Double
aborder.BorderStyleLeft = BorderStyle.Double
aborder.BorderStyleRight = BorderStyle.Groove
aborder.BorderStyleTop = BorderStyle.Groove
currstyle.CellType = currcell
currstyle.Border = aborder
FpSpread1.Sheets(0).SetStyleInfo(-1, 0, currstyle)

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.