GrapeCity SPREAD for Windows Forms 11.0J
SelectionPolicy プロパティ (ISheetSelectionModel)


ユーザーがアイテムの範囲を選択できるかどうかを表す値を取得または設定します。
構文
'Declaration
 
Property SelectionPolicy As SelectionPolicy
'使用法
 
Dim instance As ISheetSelectionModel
Dim value As SelectionPolicy
 
instance.SelectionPolicy = value
 
value = instance.SelectionPolicy
SelectionPolicy SelectionPolicy {get; set;}

プロパティ値

選択可能な範囲を決定する SelectionPolicy 設定
次のサンプルコードは、ユーザーが何を選択できるかを指定します。
FarPoint.Win.Spread.Model.ISheetSelectionModel sel;
sel = (FarPoint.Win.Spread.Model.ISheetSelectionModel)fpSpread1.ActiveSheet.Models.Selection;
sel.SelectionPolicy = FarPoint.Win.Spread.Model.SelectionPolicy.Single;
sel.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Column;
MessageBox.Show("You are only able to select columns. Try to select a row or the whole sheet", "SelectionPolicy/Unit", MessageBoxButtons.OK);
Dim sel As FarPoint.Win.Spread.Model.ISheetSelectionModel
sel = FpSpread1.ActiveSheet.Models.Selection
sel.SelectionPolicy = FarPoint.Win.Spread.Model.SelectionPolicy.Single
sel.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Column
MessageBox.Show("You are only able to select columns. Try to select a row or the whole sheet", "SelectionPolicy/Unit", MessageBoxButtons.OK)
参照

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

 

 


© 2004-2018, GrapeCity Inc. All rights reserved.