PowerTools SPREAD for Windows Forms 8.0J
SetDirectAltRowName メソッド (INamedStyleSupport)


設定する交互行のスタイルのインデックス(0からAltRowCount-1までの値)
設定するスタイルの名前
モデル内の指定した交互行のスタイルに指定した名前付きスタイルを設定します。
構文
'Declaration
 
Sub SetDirectAltRowName( _
   ByVal index As Integer, _
   ByVal styleName As String _
) 
'使用法
 
Dim instance As INamedStyleSupport
Dim index As Integer
Dim styleName As String
 
instance.SetDirectAltRowName(index, styleName)
void SetDirectAltRowName( 
   int index,
   string styleName
)

パラメータ

index
設定する交互行のスタイルのインデックス(0からAltRowCount-1までの値)
styleName
設定するスタイルの名前
次のサンプルコードは、列ヘッダ行に含まれる交互行の背景色の変更に使用する名前付きスタイルの名前を返します。
FarPoint.Win.Spread.Model.INamedStyleSupport ins;
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle("StyleHeaders");
ns.BackColor = Color.LightBlue;
fpSpread1.NamedStyles.Add(ns);
fpSpread1.ActiveSheet.ColumnHeaderRowCount = 5;
ins = (FarPoint.Win.Spread.Model.INamedStyleSupport)fpSpread1.ActiveSheet.Models.ColumnHeaderStyle;
ins.SetDirectAltRowName(1, "StyleHeaders");
label1.Text = "The name of the style used to change the color in the headers is " + ins.GetDirectAltRowName(1).ToString();
Dim ins As FarPoint.Win.Spread.Model.INamedStyleSupport
Dim ns As New FarPoint.Win.Spread.NamedStyle("StyleHeaders")
ns.BackColor = Color.LightBlue
FpSpread1.NamedStyles.Add(ns)
FpSpread1.ActiveSheet.ColumnHeaderRowCount = 5
ins = FpSpread1.ActiveSheet.Models.ColumnHeaderStyle
ins.SetDirectAltRowName(1, "StyleHeaders")
Label1.Text = "The name of the style used to change the color in the headers is " & ins.GetDirectAltRowName(1).ToString()
参照

INamedStyleSupport インタフェース
INamedStyleSupport メンバ

 

 


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