イベント ハンドラが、このイベントに関連するデータを含む、EditorNotifyEventArgs 型の引数を受け取りました。次の EditorNotifyEventArgs プロパティには、このイベントの固有の情報が記載されます。
プロパティ | 説明 |
---|
Column | エディタがイベントを発生させたセルの列インデックスを取得します。 |
EditingControl | イベントを発生させたControlオブジェクトを取得します。 |
Row | エディタがイベントを発生させたセルの行インデックスを取得します。 |
View | エディタがイベントを発生させたセルを含むビューを取得します。 |
次のサンプルコードは、ユーザーがコンボボックスのボタンをクリックしてリストから項目を選択するときに、コンボボックス関連のいくつかのイベントを発生させます。
FarPoint.Win.Spread.CellType.ComboBoxCellType cb = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
fpSpread1.ActiveSheet.Cells[0, 0].CellType = cb;
private void fpSpread1_ComboCloseUp(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
{
ListBox1.Items.Add("ComboCloseUp event fired");
}
private void fpSpread1_ComboDropDown(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
{
ListBox1.Items.Add("ComboDropDown event fired");
}
private void fpSpread1_ComboSelChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
{
ListBox1.Items.Add("ComboSelChange event fired");
}
Dim cb As New FarPoint.Win.Spread.CellType.ComboBoxCellType()
FpSpread1.ActiveSheet.Cells(0, 0).CellType = cb
Private Sub FpSpread1_ComboCloseUp(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles FpSpread1.ComboCloseUp
ListBox1.Items.Add("ComboCloseUp event fired")
End Sub
Private Sub FpSpread1_ComboDropDown(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles
FpSpread1.ComboDropDown
ListBox1.Items.Add("ComboDropDown event fired")
End Sub
Private Sub FpSpread1_ComboSelChange(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles
FpSpread1.ComboSelChange
ListBox1.Items.Add("ComboSelChange event fired")
End Sub