イベント ハンドラが、このイベントに関連するデータを含む、EditorNotifyEventArgs 型の引数を受け取りました。次の EditorNotifyEventArgs プロパティには、このイベントの固有の情報が記載されます。
プロパティ | 説明 |
---|
Column | エディタがイベントを発生させたセルの列インデックスを取得します。 |
EditingControl | イベントを発生させたControlオブジェクトを取得します。 |
Row | エディタがイベントを発生させたセルの行インデックスを取得します。 |
View | エディタがイベントを発生させたセルを含むビューを取得します。 |
次のサンプルコードは、Editorfocusedイベントを使用します。
private void fpSpread1_EditorFocused(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
{
if (e.Row == 2 & e.Column == 2)
{
FarPoint.Win.Spread.CellType.GeneralEditor g = default(FarPoint.Win.Spread.CellType.GeneralEditor);
g = (FarPoint.Win.Spread.CellType.GeneralEditor)fpSpread1.EditingControl;
g.SelectionStart = 1;
}
}
Private Sub FpSpread1_EditorFocused(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles
FpSpread1.EditorFocused
If e.Row = 2 And e.Column = 2 Then
Dim g As GeneralEditor
g = CType(FpSpread1.EditingControl, GeneralEditor)
g.SelectionStart = 1
End If
End Sub