Transparent to mouse events?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10356
Joined: Wed May 06, 2009 2:28 pm

Transparent to mouse events?

Post by dunbarx » Tue Jan 28, 2014 6:48 pm

Don't I remember a thread where one object can be made not to "see" mouse events? In other words, if I have a button directly over and covering a locked field, say, I could make a mouseclick on that button trigger a mouseUp message in the field, as if the button was not there?

"Transparent", but to events, not just for visual effects. The intent is to have such an object overlying a line in a datagrid, where that overlying object is only there for coloring purposes, and all mouse actions can pass to the DG. I know this is easily scriptable for simple controls, but in a DG it gets complicated.

Craig Newman

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10058
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Transparent to mouse events?

Post by FourthWorld » Tue Jan 28, 2014 7:27 pm

Would setting the group's colorOverlay property do what you need?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10356
Joined: Wed May 06, 2009 2:28 pm

Re: Transparent to mouse events?

Post by dunbarx » Tue Jan 28, 2014 7:40 pm

Richard.

it isn't the color or blending properties, it is a matter of making the overlying object not be the target. If I had two buttons, one on top of the other, I was thinking I once saw a discussion on how to click on that sandwich, but have the lower button receive the event. All this without scripting anything.

I could have been dreaming. If so, do you think a new property might be useful for this? A "passMessageThrough" property?

This works in the hierarchy, of course. If I just had a single button somewhere, I can pass a mouseUp event to the card, say, either by not trapping it in the button, or by passing explicitly. But this dog don't hunt with two buttons, one on top of the other.

Craig

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7394
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Transparent to mouse events?

Post by jacque » Wed Jan 29, 2014 4:27 pm

Disabling the button might do it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10356
Joined: Wed May 06, 2009 2:28 pm

Re: Transparent to mouse events?

Post by dunbarx » Wed Jan 29, 2014 4:49 pm

Jacque.

No, that would only disable the button's ability to receive mouseClicks. It wouldn't allow them to pass through it.

Looks like I was indeed dreaming. Nothing new there.

Craig

Post Reply