Spread for ASP.NET 9.0 Product Documentation
BorderColorTop Property
Example 


Gets or sets the color of the top border.
Syntax
'Declaration
 
Public Property BorderColorTop As Color
'Usage
 
Dim instance As Border
Dim value As Color
 
instance.BorderColorTop = value
 
value = instance.BorderColorTop
public Color BorderColorTop {get; set;}

Property Value

Color object that contains the color of the top border
Remarks

If you want to set the same color for all sides of the object border, use the BorderColor property.

To check if other border color 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.
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);
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 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

Border Class
Border Members
BorderColor Property
IsDefined Method

 

 


Copyright © GrapeCity, inc. All rights reserved.