PowerTools SPREAD for Windows Forms 10.0J
RowCount プロパティ (SheetStyleModelEventArgs)


行数を取得します。すべての行が影響を受けた場合は-1を返します。
構文
'Declaration
 
Public ReadOnly Property RowCount As Integer
'使用法
 
Dim instance As SheetStyleModelEventArgs
Dim value As Integer
 
value = instance.RowCount
public int RowCount {get;}

プロパティ値

影響を受けた行の数を表す Integer
次のサンプルコードは、影響を受けた行の数を返します。この場合はすべての行が影響を受けたため、-1が返されます。
FarPoint.Win.Spread.Model.BaseSheetStyleModel model;

model = (FarPoint.Win.Spread.Model.BaseSheetStyleModel)fpSpread1.ActiveSheet.Models.Style;

model.Changed += new FarPoint.Win.Spread.Model.SheetStyleModelEventHandler(model_StyleModelChanged);
    
private void button1_Click(object sender, System.EventArgs e)
{
    FarPoint.Win.Spread.StyleInfo sInfo = new FarPoint.Win.Spread.StyleInfo();
    sInfo.BackColor = Color.Teal;
    model.AltRowCount = 2;
    model.SetDirectAltRowInfo(0, sInfo);
}

private void model_StyleModelChanged(object sender, FarPoint.Win.Spread.Model.SheetStyleModelEventArgs e)
{
    textBox1.Text = e.RowCount.ToString();
}
Friend WithEvents model As FarPoint.Win.Spread.Model.BaseSheetStyleModel

model = FpSpread1.ActiveSheet.Models.Style

Dim h As FarPoint.Win.Spread.Model.SheetStyleModelEventHandler = AddressOf model_StyleModelChanged
AddHandler model.Changed, h

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim sInfo As New FarPoint.Win.Spread.StyleInfo
    sInfo.BackColor = Color.Teal
    model.AltRowCount = 2
    model.SetDirectAltRowInfo(0, sInfo)
End Sub

Private Sub model_StyleModelChanged(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.Model.SheetStyleModelEventArgs)
    TextBox1.Text = e.RowCount.ToString()
End Sub
参照

SheetStyleModelEventArgs クラス
SheetStyleModelEventArgs メンバ

 

 


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