Page 1 of 1
OK, try this,
Posted: Mon Feb 02, 2026 5:10 pm
by dunbarx
Attached is a rather simple stack with a graphic and a field. There is a single handler, a "mouseLeave" handler, and it is in the graphic script.
But if one moves the cursor in an out of that graphic, the mouseLeave handler fires both in and out, as if there was a "mouseEnter" handler in existence as well.
There isn't.
Start with a slow moving cursor because funny things happen if you increase the speed that the cursor moves. Ha Ha.
Craig
Re: OK, try this,
Posted: Mon Feb 02, 2026 6:17 pm
by ClipArtGuy
dunbarx wrote: ↑Mon Feb 02, 2026 5:10 pm
Attached is a rather simple stack with a graphic and a field. There is a single handler, a "mouseLeave" handler, and it is in the graphic script.
But if one moves the cursor in an out of that graphic, the mouseLeave handler fires both in and out, as if there was a "mouseEnter" handler in existence as well.
There isn't.
Start with a slow moving cursor because funny things happen if you increase the speed that the cursor moves. Ha Ha.
Craig
Wierd mesaage.livecode.zip
If you set the grc to opaque, this works as expected. It appears that it fires as it exits the thin line of the vector graphic when it is not set to opaque. I tested this with a much thicker line on a non-opaque grc and this seems to be the case. Not sure if that is expected behavior or not, but that's what I am seeing.
Re: OK, try this,
Posted: Mon Feb 02, 2026 7:07 pm
by dunbarx
It does work with opaque set to "true". But that should not matter. It seems to me a bug. If others agree, I will send to to QC.
This came about from a post on the use-list, where the OP want to find a message that was sent when the cursor stopped dragging in the scrollbar of a field. There is very little activity within a field's scrollBar, as opposed to a scrollbar control, where the "dragEnd" message is sent.
I thought overlaying a transparent graphic onto the field scrollbar would at least send a mouseLeave message when the cursor left that area, even though it would be better if the "dragEnd" message was supported by fields. Such a grc has to be transparent, of course.
Craig
Re: OK, try this,
Posted: Tue Feb 03, 2026 6:52 pm
by jacque
Try setting transparency to 99%. Visually you can't see the difference but the graphic should receive all messages normally.
Re: OK, try this,
Posted: Tue Feb 03, 2026 9:20 pm
by dunbarx
Jacque.
The good news is that you are still here. The bad news is that I have tried to use this little trick before, possibly due to you.
And yes, 99% is visually the same, but though the graphic, no longer transparent, can now receive mouse actions, the underlying scrollbar on the field cannot. So one cannot scroll the field with an overlying grc in place, never mind then detecting a mouseUp. That was the subject of the origin post for all this, at the Use-List. There are clever solutions there.
Craig