ToolStripPanelRow.OnControlRemoved(Control, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
引發 ControlRemoved 事件。
protected public:
virtual void OnControlRemoved(System::Windows::Forms::Control ^ control, int index);
protected internal virtual void OnControlRemoved(System.Windows.Forms.Control control, int index);
abstract member OnControlRemoved : System.Windows.Forms.Control * int -> unit
override this.OnControlRemoved : System.Windows.Forms.Control * int -> unit
Protected Friend Overridable Sub OnControlRemoved (control As Control, index As Integer)
參數
- control
- Control
被移除 ToolStripPanelRow的控制權從 .
- index
- Int32
以零為基礎的索引代表被移除控制項的位置。
備註
發起事件會透過代理呼叫事件處理者。 欲了解更多資訊,請參閱 處理與提升事件。
此 OnControlRemoved 方法也允許衍生類別在不附加代理的情況下處理事件。 這是在衍生類別中處理事件的首選技術。
給繼承者的注意事項
在導出類別中覆寫 OnControlRemoved(Control, Int32) 時,務必呼叫基底類別的方法 OnControlRemoved(Control, Int32) ,讓註冊代理接收事件。