to the class registry for
when the event fires.
expression.AddFn(fnName, fnObject, fnType, key, AddLast)
A variable that represents a cControlChild_Event
||Requiredd / Optional
||Name of the callback function to add to the registry
||Reference to the object of which the function is a member. Not required if function is in a standard module. Default is Nothing.
||Type of callback function (VbGet, VbSet, VbLet, VbMethod). Default is VbMethod Ignored if
fbObject is not passed.
||Key under which to store the callback function in the registry. If specified, overrides the default (uses the function name). Default is zero-length-string.
||If true, indicates function is to be added to the end of the registry. Default is false.
All functions added to the callback registry must implement the standard callback signature for a Composite Control. See
for more details.
All functions must be Public members of the standard module / class module in which they reside.
must be specified if the function is a member of a class.
Functions are called in reverse order of their addition to the registry. That is, each function is added to the start of the registry, unless
is True. This enables termination callbacks to be ordered such that the termination method for the local object is not called before the callback registry for it's termination event.
This example adds a function to the cControlChild_Event object that is the "OnClick" member of a cControl_EventHandler_ComboBox class. The callback function is located in a standard module.
'Access directly via the cControlChild_Event member
'Access via the event handler class's Events collection.
This example adds a callback function that is a member of a class.
comboEventHandler.OnClick.AddFn "MyClassCallbackFn", MyCallbackObject