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


モデルに選択が含まれていないかどうかを判定します。
構文
'Declaration
 
Public Overridable Function IsEmpty() As Boolean
'使用法
 
Dim instance As BaseSheetSelectionModel
Dim value As Boolean
 
value = instance.IsEmpty()
public virtual bool IsEmpty()

戻り値の型

Boolean:選択モデルに選択範囲が含まれない場合は True、それ以外の場合は False
次のサンプルコードは、モデルが空でない場合、選択範囲の色を変更します。
FarPoint.Win.Spread.Model.BaseSheetSelectionModel selModel; 
selModel = (FarPoint.Win.Spread.Model.BaseSheetSelectionModel)fpSpread1.ActiveSheet.Models.Selection; 
selModel.SetSelection(0, 0, 3, 3);

bool b;
b = selModel.IsEmpty();
if(b == false)
{
       fpSpread1.ActiveSheet.SelectionStyle = FarPoint.Win.Spread.SelectionStyles.SelectionColors;
       fpSpread1.ActiveSheet.SelectionPolicy = FarPoint.Win.Spread.Model.SelectionPolicy.Range;
       fpSpread1.ActiveSheet.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Cell;
       fpSpread1.ActiveSheet.SelectionBackColor = Color.Yellow;
}
Dim selModel As FarPoint.Win.Spread.Model.BaseSheetSelectionModel
selModel = FpSpread1.ActiveSheet.Models.Selection
selModel.SetSelection(0, 0, 3, 3)

Dim b As Boolean
b = selModel.IsEmpty()
If b = False Then
       FpSpread1.ActiveSheet.SelectionStyle = FarPoint.Win.Spread.SelectionStyles.SelectionColors
       FpSpread1.ActiveSheet.SelectionPolicy = FarPoint.Win.Spread.Model.SelectionPolicy.Range
       FpSpread1.ActiveSheet.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Cell
       FpSpread1.ActiveSheet.SelectionBackColor = Color.Yellow
End If
参照

BaseSheetSelectionModel クラス
BaseSheetSelectionModel メンバ

 

 


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