Highlight_Button Property

Returns a reference to the cControlChild_ActiveButton object which manages the WebButton's highlight state. Read/Write cControlChild_ActiveButton.



object A valid reference to a cControl_WebButton object.


The Highlight_Button reference may be shared among a series of controls in order to create an option group of WebButtons.


This example demonstrates how to assign multiple cControlWebButtons the same HighlightButton property reference, so that moving the mouse over an unhighlighted button removes the highlight from another button in the same group.

Dim hButton as cControlChild_ActiveButton
Dim wb as cControl_WebButton

'colWebButtons is a pre-defined collection of web button controls, all of them presumably members of the same group.
For Each wb In colWebButtons

        'Each cControl_WebButton instances it's own cControlChild_ActibeButton for a Highlight_Button
        'Reference to the first control's Highlight_Button is retrieved and assigned to all other cControl_WebButtons,
        'automatically destroying their local references.

        If (hButton Is Nothing) Then
                Set hButton = wb.Highlight_Button
                Set wb.Highlight_Button = hButton
        End If

Next wb

Last edited Dec 24, 2010 at 2:01 PM by vba_junkie, version 3


No comments yet.