ToolStripPanelRow.OnControlAdded(Control, Int32) 方法

定义

引发 ControlAdded 事件。

protected public:
 virtual void OnControlAdded(System::Windows::Forms::Control ^ control, int index);
protected internal virtual void OnControlAdded(System.Windows.Forms.Control control, int index);
abstract member OnControlAdded : System.Windows.Forms.Control * int -> unit
override this.OnControlAdded : System.Windows.Forms.Control * int -> unit
Protected Friend Overridable Sub OnControlAdded (control As Control, index As Integer)

参数

control
Control

添加到该控件的 ToolStripPanelRow控件。

index
Int32

表示已添加控件位置的从零开始的索引。

注解

引发事件会通过委托调用事件处理程序。 有关详细信息,请参阅 处理和引发事件

该方法 OnControlAdded 还允许派生类在不附加委托的情况下处理事件。 这是处理派生类中的事件的首选技术。

继承者说明

在派生类中重写 OnControlAdded(Control, Int32) 时,请务必调用基类的方法,以便已注册的 OnControlAdded(Control, Int32) 委托接收事件。

适用于