mouseHover

mouseHover(control: control-type input;
           button:  Integer;
           shift:   Integer;
           x:       Real;
           y:       Real);

The mouseHover event occurs when the user moves the mouse onto a control and then the mouse remains static for one second or longer.

The parameters of the mouseHover event are listed in the following table.

Parameter Description
button The state of the mouse buttons as an integer, in which a bit is set if the button is down.
 
  • 0 (no button down)

 
  • 1 (left button)

 
  • 2 (right button)

 
  • 3 (middle button)

shift The state of the Shift, Ctrl, and Alt keys when the button specified in the button parameter was pressed or released. A bit is set if the key is down. The shift parameter is a bit integer, with the least-significant bits corresponding to the Shift key (bit 0), the Ctrl key (bit 1), and the Alt key (bit 2).
  The shift parameter indicates the state of these keys. Some, all, or none of the bits can be set, indicating which keys were pressed. For example, if both Ctrl and Alt were pressed, the value of shift would be 6.
x The current left physical position of the mouse pointer in the window. This is in the units of the scaleMode property of the form or control.
y The current top physical position of the mouse pointer in the window. This is in the units of the scaleMode property of the form or control.

For details about converting the horizontal (x) and vertical (y) physical pixel positions to logical positions within the window that has been scrolled, see the scrollHorzPos property.

This event can occur over the non‑client parts of the control. The x and y positions are relative to the client area of the control and can be negative or greater than the client width and height. The event can also occur if a mouse button is down and the Shift or Ctrl key is down.

After the mouseHover event is generated, another event is generated for the same control each time the mouse is moved on the control and then becomes static again for one second or longer.

If the window implements the mouseHover event, bubble help is displayed after the mouseHover event has been executed. This allows the mouseHover event to set the bubbleHelp property text value that is appropriate for the mouse position; for example, a ListBox control the list entry that the mouse is over. The bubble help display is cancelled if the user moves the mouse away from the list item over which the mouse pointer was positioned.

Consider using the mouseHover event instead of the mouseMove event, as the mouseHover event can achieve what is required with one event instead of several mouseMove events.

Use the mouseEnter event to respond when the user moves the mouse pointer onto a control but the mouse does not then become static (that is, the mouse does not hover over the control).

2016.0.01 and higher