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


Glossary Item Box

Returns the property name as a string.

Syntax

Visual Basic (Declaration) 
Public Overrides Function ToString() As String
Visual Basic (Usage)Copy Code
Dim instance As AppearanceProperty
Dim value As String
 
value = instance.ToString()
C# 
public override string ToString()

Return Value

String containing the name of the property

Example

This example creates a new AppearanceProperty object, sets several of its properties, then returns the BackColor property as a string to a text box.
C#Copy Code
FarPoint.Web.Spread.Appearanceappr=NewFarPoint.Web.Spread.Appearance();
FarPoint.Web.Spread.Cellacell;
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;
TextBox1.Text=FarPoint.Web.Spread.AppearanceProperty.BackColor.ToString();
Visual BasicCopy Code
DimapprAsNewFarPoint.Web.Spread.Appearance()
DimacellAsFarPoint.Web.Spread.Cell
DimpropAsFarPoint.Web.Spread.AppearanceProperty
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
TextBox1.Text=prop.BackColor.ToString

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.