MESCIUS SPREAD for ASP.NET 10.0J
VerticalAlign フィールド (AppearanceProperty)

オブジェクトの垂直方向の配置を指定するVerticalAlignプロパティ(インデックスは4)を表します。
構文
'Declaration
 
Public Shared ReadOnly VerticalAlign As AppearanceProperty
public static readonly AppearanceProperty VerticalAlign
この例では、新しいAppearanceオブジェクトを作成し、このオブジェクトのBackColorプロパティを設定し、それをCellオブジェクトのインスタンスに適用します。次に、BackColorプロパティが定義されているかどうかをチェックし、結果をテキストボックスに返します。
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.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);
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.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
参照

AppearanceProperty クラス
AppearanceProperty メンバ

 

 


© MESCIUS inc. All rights reserved.