MESCIUS SPREAD for Windows Forms 17.0J
StringNotFound イベント

一致する項目が見つからなかったことで検索がキャンセルされたときに発生します。
構文
'Declaration
 
Public Event StringNotFound As CancelEventHandler
public event CancelEventHandler StringNotFound
イベント データ

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

プロパティ説明
Cancel  
例
次のサンプル コードでは、このイベントを使用して、文字列が見つからなかったことをユーザーに知らせています。
FarPoint.Win.Spread.SearchDialog sd;
fpSpread1.SearchWithDialog("Test");
sd = fpSpread1.SearchDialog;
sd.StringNotFound += new CancelEventHandler(sdStringNotFound);

void sdStringNotFound(object sender, CancelEventArgs e)
{
         MessageBox.Show("The string was not found."); 
}

Dim WithEvents sd As FarPoint.Win.Spread.SearchDialog
FpSpread1.SearchWithDialog("Test")
sd = FpSpread1.SearchDialog
sd.SetCustomTextToDefaults()

Private Sub sdStringNotFound(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles sd.StringNotFound
         MessageBox.Show("The string was not found.")
   End Sub
参照

SearchDialog クラス
SearchDialog メンバ
CancelEventHandler クラス
CancelEventArgs クラス

 

 


© MESCIUS inc. All rights reserved.