On[Event] Property


Returns a reference to a cControlChild_Event object.

Syntax

object.On[Event]

object A reference to a cControl_EventHandler class instance.

[Event] Name of the event for which the cControlChild_Event object acts as a delegator.

Remarks

These events are defined in the class module for each cControl_EventHandler"{ class. Each class may implement any variety of events supported by the control the class handles. Not all events sourced by a particular control are necessarily trapped by the corresponding {"cControl_EventHandler class. It is recommended that no more events are trapped than are necessary.

Example

This example returns the number of callback functions registered with the OnClick event of a ComboBox event handler

MsgBox "There are " & Cstr(myComboBoxEventHandler.OnClick.Callbacks.Count) & " callbacks assigned to the " & myComboBoxEventHandler.OnClick.Name & " event."

Last edited Dec 20, 2010 at 2:40 AM by vba_junkie, version 2

Comments

No comments yet.