Data Grid and mouseEnter - mouseLeave
Posted: Wed Dec 04, 2013 10:42 am
Hi,
I' created a Data Grid and on its script I wrote this code:
What I'm trying to do is to reduce its height when the mouse is not within the rect of the data grid, my code sometimes does work, but sometimes id doesn't.
For example, if I move too fast the mouse or if I move the mouse on the top of the grid, the mouseLeave message is not delivered (or something else happens...).
Can someone help me, please?
Thank you.
I' created a Data Grid and on its script I wrote this code:
Code: Select all
on mouseEnter
--lock screen
if the mouseLoc is within the rect of me then
put the top of me into theTop
set the height of me to 126
set the top of me to theTop
end if
end mouseEnter
on mouseLeave
--lock screen
--wait 1 sec
if the mouseLoc is not within the rect of me then
put the top of me into theTop
set the height of me to 19
set the top of me to theTop
end if
end mouseLeave
For example, if I move too fast the mouse or if I move the mouse on the top of the grid, the mouseLeave message is not delivered (or something else happens...).
Can someone help me, please?
Thank you.