ListControl.TextChanged 事件

定义

TextSelectedValue 属性更改时发生。Occurs when the Text and SelectedValue properties change.

public:
 virtual event EventHandler ^ TextChanged;
public event EventHandler TextChanged;
member this.TextChanged : EventHandler 
Public Custom Event TextChanged As EventHandler 

事件类型

EventHandler

实现

注解

TextChangedText 和属性更改时,将引发事件 SelectedValueThe TextChanged event is raised when the Text and SelectedValue properties change.

引发事件时,将通过委托调用事件处理程序。Raising an event invokes the event handler through a delegate. 有关如何处理事件的详细信息,请参阅 处理和引发事件For more information about how to handle events, see Handling and Raising Events.

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.

适用于

另请参阅