PowerTools SPREAD for ASP.NET 8.0J
Clone メソッド (Appearance)

現在のインスタンスのコピーである新しいAppearanceオブジェクトを作成します。
構文
'Declaration
 
Public Overridable Function Clone() As Object
public virtual object Clone()

戻り値の型

新しくコピーされた Appearance オブジェクトを含む Object
この例では、2つのAppearanceオブジェクトと1つのCellオブジェクトを作成します。1番目のAppearanceオブジェクトにいくつかのプロパティを設定し、それらを2番目のインスタンスにクローンします。次に、2番目のAppearanceオブジェクトのプロパティをCellオブジェクトの対応するプロパティに適用します。
FarPoint.Web.Spread.Appearance appr = New FarPoint.Web.Spread.Appearance();
FarPoint.Web.Spread.Appearance appr1 = 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;
appr1 = appr.Clone();
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, "Appearance Test");
FpSpread1.Columns[0].Width = 150;
FpSpread1.Rows[0].Height = 60;
Dim appr As New FarPoint.Web.Spread.Appearance()
Dim appr1 As New FarPoint.Web.Spread.Appearance()
appr.BackColor = Color.Red
appr.ForeColor = Color.White
appr.Font.Bold = True
appr.HorizontalAlign = HorizontalAlign.Right
appr.VerticalAlign = VerticalAlign.Top
appr1 = appr.Clone()
Dim acell As FarPoint.Web.Spread.Cell
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, "Appearance Test")
FpSpread1.Columns(0).Width = 150
FpSpread1.Rows(0).Height = 60
参照

Appearance クラス
Appearance メンバ

 

 


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