PowerTools SPREAD for Windows Forms 8.0J
ComboSelChange イベント


ユーザーがセルのコンボボックスの選択項目を変更するときに発生します。
構文
'Declaration
 
Public Event ComboSelChange As EditorNotifyEventHandler
'使用法
 
Dim instance As FpSpread
Dim handler As EditorNotifyEventHandler
 
AddHandler instance.ComboSelChange, handler
public event EditorNotifyEventHandler ComboSelChange
イベント データ

イベント ハンドラが、このイベントに関連するデータを含む、EditorNotifyEventArgs 型の引数を受け取りました。次の EditorNotifyEventArgs プロパティには、このイベントの固有の情報が記載されます。

プロパティ説明
Columnエディタがイベントを発生させたセルの列インデックスを取得します。  
EditingControlイベントを発生させたControlオブジェクトを取得します。  
Rowエディタがイベントを発生させたセルの行インデックスを取得します。  
Viewエディタがイベントを発生させたセルを含むビューを取得します。  
解説

このイベントは、コンボ ボックスのドロップダウン リストから同じ項目または別の項目が選択されたときに OnComboSelChange メソッドによって呼び出されます。選択項目は、ユーザーが別のリスト項目をクリックするか矢印キーを押すことで、リスト内の別の項目をハイライト表示させたときに変更されます。

このイベントは、ユーザーがコンボ ボックスのリストを閉じる前にリストを更新する場合に使用します。ComboDropDown イベントは、このイベントの前に発生します。ComboCloseUp イベントは、このイベントの後に発生します。

個々のイベント引数の詳細については、EditorNotifyEventArgs メンバを参照してください。

次のサンプルコードは、ユーザーがコンボボックスのボタンをクリックしてリストから項目を選択するときに、コンボボックス関連のいくつかのイベントを発生させます。
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
参照

FpSpread クラス
FpSpread メンバ
ComboCloseUp イベント
ComboDropDown イベント
EditorNotifyEventArgs クラス

開発者ガイド

コンボボックス型セル

 

 


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