Spread ASP.NET 6.0 Product Documentation
Font Field
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > AppearanceProperty Class : Font Field


Glossary Item Box

Represents the Font property (index is 1), which specifies the font characteristics of the object.

Syntax

Visual Basic (Declaration) 
Public Shared ReadOnly Font As AppearanceProperty
Visual Basic (Usage)Copy Code
Dim value As AppearanceProperty
 
value = AppearanceProperty.Font
C# 
public static readonly AppearanceProperty Font

Remarks

You can specify several aspects of the font, including the the style, the size, and the face name. For more information on the font settings in general, refer to the FontInfo class members, and for a list of the font styles in particular, refer to the FontStyle enumeration, in the Microsoft .NET Framework Reference.

The setting for this field can be overridden if a named style is assigned to the cell using the StyleName property, and that named style sets the Font object.

Note: The overline style is not supported in browsers release prior to Internet Explorer 4.

Example

This example creates a new Appearance object, sets the BackColor property for the object and applies it to an instance of a Cell object. Then the BackColor property is checked to determine if it has been defined, and the result is returned to a text box.
C#Copy Code
FarPoint.Web.Spread.Appearanceappr=NewFarPoint.Web.Spread.Appearance();
FarPoint.Web.Spread.Cellacell;
boolbl;
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.SetCellValue(0,0,"AppearanceTest");
FpSpread1.Columns[0].Width=150;
FpSpread1.Rows[0].Height=60;
bl=appr.IsDefined(FarPoint.Web.Spread.AppearanceProperty.BackColor);
TextBox1.Text=Convert.ToString(bl);
Visual BasicCopy Code
DimapprAsNewFarPoint.Web.Spread.Appearance()
DimacellAsFarPoint.Web.Spread.Cell
DimblAsBoolean
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=appr1.BackColor
acell.ForeColor=appr1.ForeColor
acell.Font.Bold=appr1.Font.Bold
acell.HorizontalAlign=appr1.HorizontalAlign
acell.VerticalAlign=appr1.VerticalAlign
FpSpread1.ActiveSheetView.SetCellValue(0,0,"AppearancePropertyTest")
FpSpread1.Columns(0).Width=150
FpSpread1.Rows(0).Height=60
bl=appr.IsDefined(FarPoint.Web.Spread.AppearanceProperty.BackColor)
TextBox1.Text=bl

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.