PowerTools SPREAD for Windows Forms 10.0J
RemoveSelection メソッド (BaseSheetSelectionModel)


範囲の先頭のセルの行インデックス
範囲の先頭のセルの列インデックス
選択解除する行数
選択解除する列数
選択リストがある場合に、選択リストから指定した選択範囲を削除します。
構文
'Declaration
 
Public Overridable Sub RemoveSelection( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal rowCount As Integer, _
   ByVal columnCount As Integer _
) 
'使用法
 
Dim instance As BaseSheetSelectionModel
Dim row As Integer
Dim column As Integer
Dim rowCount As Integer
Dim columnCount As Integer
 
instance.RemoveSelection(row, column, rowCount, columnCount)
public virtual void RemoveSelection( 
   int row,
   int column,
   int rowCount,
   int columnCount
)

パラメータ

row
範囲の先頭のセルの行インデックス
column
範囲の先頭のセルの列インデックス
rowCount
選択解除する行数
columnCount
選択解除する列数
次のサンプルコードは、指定した選択範囲を削除します。
private void menuItem1_Click(object sender, System.EventArgs e)
{
FarPoint.Win.Spread.Model.BaseSheetSelectionModel selModel;
selModel = (FarPoint.Win.Spread.Model.BaseSheetSelectionModel)fpSpread1.ActiveSheet.Models.Selection;
selModel.AddSelection(0,0,3,4);
}

private void menuItem2_Click(object sender, System.EventArgs e)
{
FarPoint.Win.Spread.Model.BaseSheetSelectionModel selModel;
selModel = (FarPoint.Win.Spread.Model.BaseSheetSelectionModel)fpSpread1.ActiveSheet.Models.Selection;
selModel.RemoveSelection(0, 0, 3, 4);
}
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
Dim selModel As FarPoint.Win.Spread.Model.BaseSheetSelectionModel
selModel = FpSpread1.ActiveSheet.Models.Selection
selModel.AddSelection(0, 0, 3, 4)
End Sub

Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
Dim selModel As FarPoint.Win.Spread.Model.BaseSheetSelectionModel
selModel = FpSpread1.ActiveSheet.Models.Selection
selModel.RemoveSelection(0, 0, 3, 4)
End Sub
参照

BaseSheetSelectionModel クラス
BaseSheetSelectionModel メンバ

 

 


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