Spread ASP.NET 6.0 Product Documentation
GetAppearance(Appearance) Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > StyleInfo Class > GetAppearance Method : GetAppearance(Appearance) Method


appearance
Appearance object to receive the appearance settings or null to create and return a new Appearance object

Glossary Item Box

Gets the appearance settings for the StyleInfo object.

Syntax

Visual Basic (Declaration) 
Public Overloads Function GetAppearance( _
   ByVal appearance As Appearance _
) As Appearance
Visual Basic (Usage)Copy Code
Dim instance As StyleInfo
Dim appearance As Appearance
Dim value As Appearance
 
value = instance.GetAppearance(appearance)
C# 
public Appearance GetAppearance( 
   Appearance appearance
)

Parameters

appearance
Appearance object to receive the appearance settings or null to create and return a new Appearance object

Return Value

Appearance object containing the appearance settings

Example

This example creates an Appearance object and two StyleInfo objects. The cinfo object passes its settings into the Appearance object, which is then used to adjust the settings for the info objects properties. That, in turn, is used to set the style for the spreadsheet.
C#Copy Code
 FarPoint.Web.Spread.Appearance appr = new FarPoint.Web.Spread.Appearance();
 FarPoint.Web.Spread.StyleInfo info = new FarPoint.Web.Spread.StyleInfo();
 FarPoint.Web.Spread.StyleInfo cinfo = new FarPoint.Web.Spread.StyleInfo();
 cinfo.BackColor = Color.Red;
 cinfo.ForeColor = Color.White;
 cinfo.HorizontalAlign = HorizontalAlign.Right;
 cinfo.GetAppearance(appr);
 info.BackColor = appr.BackColor;
 info.ForeColor = appr.ForeColor;
 info.HorizontalAlign = appr.HorizontalAlign;
 FpSpread1.ActiveSheetView.SetStyleInfo(0, 0, info);
 FpSpread1.ActiveSheetView.SetValue(0, 0, "StyleInfo");
 FpSpread1.Columns[0].Width = 150;
 FpSpread1.Rows[0].Height = 60; 
Visual BasicCopy Code
 Dim appr As New FarPoint.Web.Spread.Appearance()
 Dim info As New FarPoint.Web.Spread.StyleInfo()
 Dim cinfo As New FarPoint.Web.Spread.StyleInfo()
 cinfo.BackColor = Color.Red
 cinfo.ForeColor = Color.White
 cinfo.HorizontalAlign = HorizontalAlign.Right
 cinfo.GetAppearance(appr)
 info.BackColor = appr.BackColor
 info.ForeColor = appr.ForeColor
 info.HorizontalAlign = appr.HorizontalAlign
 FpSpread1.ActiveSheetView.SetStyleInfo(0, 0, info)
 FpSpread1.ActiveSheetView.SetValue(0, 0, "StyleInfo")
 FpSpread1.Columns(0).Width = 150
 FpSpread1.Rows(0).Height = 60 

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.