Creating a Delayed onMouseEnter Popup Action

Hello,

I’m trying to create a tooltip for a component which will popup when your mouse hovers over the component and close when the mouse moves off the component. I have successfully implemented this using the onMouseEnter and onMouseLeave popup event scripts.

However, with this if you quickly move your cursor across the screen and happen to hover over the component in the process, the tooltip will quickly flash on the screen. This is a rather minor inconvenience but is there a way to modify these popup events so the mouse must hover over the component for a fixed amount of time (say 0.3 seconds) before popping up to avoid this?

Thanks,
Nick

Idk if its right. But I make the event call a method that uses

time.sleep()

To do that. It works well for me.

@pturmel is going to show up soon to tell you (correctly of course) of the horrors of time.sleep(). Don’t use that. Sorry to not be much help, but time.sleep() is almost certainly not the right solution.

:laughing:
Not the first time he will have gotten on to me!

It runs on the gateway tho!

I stand corrected.

1 Like