ListControl.OnTextChanged(EventArgs) 方法

定义

引发 TextChanged 事件。Raises the TextChanged event.

protected:
 virtual void OnTextChanged(EventArgs ^ e);
protected virtual void OnTextChanged (EventArgs e);
abstract member OnTextChanged : EventArgs -> unit
override this.OnTextChanged : EventArgs -> unit
Protected Overridable Sub OnTextChanged (e As EventArgs)

参数

e
EventArgs

包含事件数据的 EventArgsAn EventArgs that contains event data.

注解

方法由派生ListControl自类的控件调用以引发TextChanged事件。 OnTextChangedThe OnTextChanged method is called by the control that is derived from the ListControl class to raise the TextChanged event. 通常,在OnTextChanged ListControl扩展类时,控件开发人员将使用此方法。Generally, the OnTextChanged method is used by control developers when extending the ListControl class.

OnTextChanged 方法还允许派生类对事件进行处理而不必附加委托。The OnTextChanged method also allows derived classes to handle the event without attaching a delegate. 这是在派生类中处理事件的首选技术。This is the preferred technique for handling the event in a derived class.

继承者说明

当在派生OnTextChanged(EventArgs)类中重写方法时,请确保OnTextChanged(EventArgs)调用基类的方法,以便注册的委托接收事件。When overriding the OnTextChanged(EventArgs) method in a derived class, be sure to call the OnTextChanged(EventArgs) method for the base class so that registered delegates receive the event.

适用于

另请参阅