Register Method


Registers a cControl_EventHandler class instance as a WebButton deselector.

Syntax

object.Register (handler)

object A reference to a valid cControl_WebButton class instance.

Parameters

Name Required / Optional Data Type Description
handler Required cControl_EventHandler Reference to a valid cControl_EventHandler object which sinks the MouseMove event.

Remarks

The Register method takes the current Highlight_Button reference from it's parent cControl_WebButton and register's the Highlight_Button's Deselect_ callback function with the handler object's OnMouseMove event.

This method allows controls which may be immediately adjacent to one or several controls to be used to "unhighlight" the button actively highlighted. It is not necessary to register a cControlWebButton's event handler as a deselector for another WebButton. This is managed internally in the cControlWebButton class.

Example

This example registers a form's section control event handler as the Deselector for a series of WebButtons. This code takes place at the cCompositeControls class level.
The net effect is that any WebButton referenced by the Highlight_Button.webBtn property of the cControl_WebButtons stored in the collection will be "unhighlighted" should the mouse move over the Detail section control of the "myForm" form.

Dim wb as cControl_WebButton
Dim sectionHandler as cControl_EventHandler_Section

Set sectionHandler = EventHandlers.GetOrCreate([myForm].Section("Detail")

For Each wb in myWebButtonsCollection

        wb.Deselector.Register sectionHandler

Next wb

Last edited Dec 25, 2010 at 11:02 AM by vba_junkie, version 1

Comments

No comments yet.