Is there a way to do the opposite of OnMouseMove?

I want to show a hidden widget when the user moves their cursor. OnMouseMove works great!! Once the user stops moving their cursor, is there a way to wait 2 seconds and then have the widget disappear again?

I believe the closest action might be OnDragDrop, but this would require that your widget be converted into a dynamic panel and then the mouse needs to be pressed and released. I’ll go ahead and put in a feature request for an event that specifically fires when the mouse cursor stops moving.

In the meantime, you could try creating a timer and having your widget hide when the timer counts up/counts down to a certain value. Each time you move the mouse the timer would get reset, and the “hide” action would only fire when the timer reaches 0/the value you’re counting to. There’s an example file over in this thread here:

Resetting a case by mouse movement

Hopefully that helps!

OK, what about this?

Show-Hide-onMouseMove

The code for the boundary box is:

The mouse handler:

So, as the mouse cursor moves within the boundary box, the x and y location of the cursor is tracked in two global variables. If the mouse moves fast enough, these two values will be different. It turns out you have to move the mouse very slowly to not trigger this (unless maybe you have a hot gaming system?) But, the slower the mouse moves the more likely some blinking will occur.

Another problem with this approach is the 2 sec delay after the cursor stops moving is not guaranteed. You can increase the auto repeat time for a “usually” longer delay. Also, if you move cursor over the special widget, it will blink sporadically.
Show-Hide-onMouseMove.rp (58.8 KB)

Thanks! This is a helpful trick.