Spread for ASP.NET 9.0 Product Documentation
ForeColor Property (Appearance)
Example 


Gets or sets the text color of an object.
Syntax
'Declaration
 
Public Property ForeColor As Color
'Usage
 
Dim instance As Appearance
Dim value As Color
 
instance.ForeColor = value
 
value = instance.ForeColor
public Color ForeColor {get; set;}

Property Value

Color object that contains the text color
Example
This example creates a new Appearance object, sets the several properties such as color and alignment, then applies those settings to an instance of a Cell object.
FarPoint.Web.Spread.Appearance appr = new FarPoint.Web.Spread.Appearance();
FarPoint.Web.Spread.Cell acell;
appr.BackColor = Color.Red;
appr.ForeColor = Color.White;
appr.Font.Bold = true;
appr.HorizontalAlign = HorizontalAlign.Right;
appr.VerticalAlign = VerticalAlign.Top;
acell = FpSpread1.Cells[0,0];
acell.BackColor = appr.BackColor;
acell.ForeColor = appr.ForeColor;
acell.Font.Bold = appr.Font.Bold;
acell.HorizontalAlign = appr.HorizontalAlign;
acell.VerticalAlign = appr.VerticalAlign;
FpSpread1.ActiveSheetView.SetValue(0, 0, "Appearance Test");
FpSpread1.Columns[0].Width = 150;
FpSpread1.Rows[0].Height = 60;
Dim appr As New FarPoint.Web.Spread.Appearance()
appr.BackColor = Color.Red
appr.ForeColor = Color.White
appr.Font.Bold = True
appr.HorizontalAlign = HorizontalAlign.Right
appr.VerticalAlign = VerticalAlign.Top
Dim acell As FarPoint.Web.Spread.Cell
acell = FpSpread1.Cells(0, 0)
acell.BackColor = appr.BackColor
acell.ForeColor = appr.ForeColor
acell.Font.Bold = appr.Font.Bold
acell.HorizontalAlign = appr.HorizontalAlign
acell.VerticalAlign = appr.VerticalAlign
FpSpread1.ActiveSheetView.SetValue(0, 0, "Appearance Test")
FpSpread1.Columns(0).Width = 150
FpSpread1.Rows(0).Height = 60
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

Appearance Class
Appearance Members

 

 


Copyright © GrapeCity, inc. All rights reserved.