PowerTools SPREAD for ASP.NET 8.0J
ToString メソッド (AppearanceProperty)

プロパティ名を文字列として返します。
構文
'Declaration
 
Public Overrides Function ToString() As String
public override string ToString()

戻り値の型

プロパティの名前を含むString
この例では、新しいAppearancePropertyオブジェクトを作成し、いくつかのプロパティを設定した後、BackColorプロパティを文字列としてテキストボックスに返します。
FarPoint.Web.Spread.Appearance appr = new FarPoint.Web.Spread.Appearance();
FarPoint.Web.Spread.Cell acell;
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();
Dim appr As New FarPoint.Web.Spread.Appearance()
Dim acell As FarPoint.Web.Spread.Cell
Dim prop As FarPoint.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
参照

AppearanceProperty クラス
AppearanceProperty メンバ

 

 


© 2003-2015, GrapeCity inc. All rights reserved.