VLButtonBar Reference

Read/Write Property ButtonHighlightChanged

See Also See Also Applies To Applies To

This event is triggered whenever button highlighting status changes due to either mouse entering/leaving a button area, or due to keyboard operations.

 

Syntax

Private Sub object_ButtonHighlightChanged( aButton As CButton, ByVal bHighlighted As Boolean)

 

The ButtonHighlightChanged event syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies to list.
aButton An object expression that evaluates to CButton.
bHighlighted A boolean expression that specifies the button is highlighted or not.

 

Remark

When mouse leaves one button area and enters another, the event is fired twice. Once to indicate that the mouse is leaving a button area and then, to indicate that mouse is entering a new button area.

This event is typically used to displaying a brief help message on status bar when the button is highlighted. Button help messages can be stored in the Prompt property of each button.

Following piece of code demonstrate the use of ButtonHighlightChanged, and Prompt property :

 

Private Sub VLButtonBar1_ButtonHighlightChanged(aButton As CButton, ByVal bHighlighted As Boolean)
   If (bHighlighted) Then
      StatusBar1.Panels(1).Text = aButton.Prompt
   Else
      StatusBar1.Panels(1).Text = ""
   End If
End Sub