作成日: 2017/08/25 最終更新日: 2017/08/25
文書種別
技術情報
詳細
InputManのコントロールを継承したクラスでOnTextChangingメソッドをオーバーライドしても、TextChangingイベントハンドラを設定しない限りコントロールのOnTextChangingメソッドは呼び出されません。
この動作は製品のパフォーマンスを考慮した設計にもとづく仕様です。
オーバーライドしたOnTextChangingメソッドを呼び出す場合には、TextChangingイベントハンドラを設定してください。
[Visual Basic]
[C#]
この動作は製品のパフォーマンスを考慮した設計にもとづく仕様です。
オーバーライドしたOnTextChangingメソッドを呼び出す場合には、TextChangingイベントハンドラを設定してください。
[Visual Basic]
Imports GrapeCity.Win.Editors Public Class GcTextBoxEx Inherits GcTextBox Public Sub New() MyBase.New() End Sub Public Sub New(ByVal container As IContainer) MyBase.New(container) End Sub ' オーバーライドしたOnTextChangingメソッド Protected Overrides Sub OnTextChanging(ByVal e As TextChangingEventArgs) ... MyBase.OnTextChanging(e) End Sub ' TextChangingイベントハンドラを設定 Private Sub GcTextBoxEx_TextChanging(ByVal sender As Object, ByVal e As TextChangingEventArgs) Handles Me.TextChanging End Sub End Class
[C#]
using GrapeCity.Win.Editors;
class GcTextBoxEx : GcTextBox
{
public GcTextBoxEx() : base()
{
// TextChangingイベントハンドラを設定
this.TextChanging += new TextChangingEventHandler(this.GcTextBoxEx_TextChanging);
}
public GcTextBoxEx(IContainer container) : base( container)
{
// TextChangingイベントハンドラを設定
this.TextChanging += new TextChangingEventHandler(this.GcTextBoxEx_TextChanging);
}
// オーバーライドしたOnTextChangingメソッド
protected override void OnTextChanging(TextChangingEventArgs e)
{
...
base.OnTextChanging(e);
}
private void GcTextBoxEx_TextChanging(Object sender, TextChangingEventArgs e)
{
}
}
旧文書番号
40980