ToolStripComboBox.OnSubscribeControlEvents(Control) Method

Definition

Suscribe eventos del control especificado.Subscribes events from the specified control.

protected:
 override void OnSubscribeControlEvents(System::Windows::Forms::Control ^ control);
protected override void OnSubscribeControlEvents (System.Windows.Forms.Control control);
override this.OnSubscribeControlEvents : System.Windows.Forms.Control -> unit
Protected Overrides Sub OnSubscribeControlEvents (control As Control)

Parameters

control
Control

Control a partir del cual se suscribirán eventos.The control from which to subscribe events.

Remarks

Invalide el método OnSubscribeControlEvents para agregar o evitar la sincronización de eventos de control.Override the OnSubscribeControlEvents method to add or prevent the synchronizing of control events.

Si invalida y enlaza eventos aquí, desenlacelos mediante el método OnUnsubscribeControlEvents.If you override and hook up events here, unhook them by using the OnUnsubscribeControlEvents method.

Cuando se genera un evento, se invoca el controlador de eventos a través de un delegado.Raising an event invokes the event handler through a delegate. Para obtener más información, consulte controlar y provocar eventos.For more information, see Handling and Raising Events.

El método OnSubscribeControlEvents también permite que las clases derivadas controlen el evento sin adjuntar ningún delegado.The OnSubscribeControlEvents method also allows derived classes to handle the event without attaching a delegate. Ésta es la técnica preferida para controlar el evento en una clase derivada.This is the preferred technique for handling the event in a derived class.

Notes to Inheritors

Al reemplazar OnSubscribeControlEvents(Control) en una clase derivada, asegúrese de llamar al método OnSubscribeControlEvents(Control) de la clase base para que los delegados registrados reciban el evento.When overriding OnSubscribeControlEvents(Control) in a derived class, be sure to call the base class’s OnSubscribeControlEvents(Control) method so that registered delegates receive the event.

Applies to