Spread for ASP.NET 10 Product Documentation
VerticalAlign Field (AppearanceProperty)
Example 


Represents the VerticalAlign property (index is 4), which specifies the vertical alignment of the object.
Syntax
'Declaration
 
Public Shared ReadOnly VerticalAlign As AppearanceProperty
'Usage
 
Dim value As AppearanceProperty
 
value = AppearanceProperty.VerticalAlign
public static readonly AppearanceProperty VerticalAlign
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.
FarPoint.Web.Spread.Appearance appr = new FarPoint.Web.Spread.Appearance();
FarPoint.Web.Spread.Cell acell;
bool bl;
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,"AppearanceTest");
FpSpread1.Columns[0].Width=150;
FpSpread1.Rows[0].Height=60;
bl=appr.IsDefined(FarPoint.Web.Spread.AppearanceProperty.BackColor);
TextBox1.Text=Convert.ToString(bl);
Dim appr As New FarPoint.Web.Spread.Appearance()
Dim acell As FarPoint.Web.Spread.Cell
Dim bl As Boolean
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.SetValue(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 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

AppearanceProperty Class
AppearanceProperty Members

 

 


Copyright © GrapeCity, inc. All rights reserved.