Cant select objects over image when in pointer mode

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm
Location: Winnipeg, Canada

Cant select objects over image when in pointer mode

Post by raugert » Fri Mar 30, 2018 10:21 pm

I use the pointer tool to allow user to move objects around. It worked good so far until I added an image as a background on the card. Until then, I was able to lasso multiple images and move theme around when using the pointer tool. I realize the image I added is also an object, but even if I set the image to "can't select" it doesn't seem to help. I can only select one object at a time. Or I can use the shift key to select multiple objects. The lasso no longer works :?

Maybe there is another way of adding an image as a background on a card that won't interfere with the "lasso" handler ? There's probably another name for that :oops:
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm
Location: Winnipeg, Canada

Re: Cant select objects over image when in pointer mode

Post by raugert » Sat Mar 31, 2018 1:23 am

I have found this solution in an old post, using the backgroundPattern of the card instead of an image on top of the card. Works well.

Code: Select all

set the backgroundPattern of this card to the short id of image 1
Thanks Bernd :D
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9579
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Cant select objects over image when in pointer mode

Post by dunbarx » Sat Mar 31, 2018 5:14 am

A solution is a solution.

But what was the cause of the original problem? Was your selection handler in the card script, and the image blocked messages? In other words, whatever message you used, would passing that message in the image make the process work again?

Craig Newman

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Cant select objects over image when in pointer mode

Post by jacque » Sat Mar 31, 2018 5:31 pm

I think he's just relying on engine behavior, so there are no messages per se. When the engine sees the pointer over another control, dragging won't work to select until it leaves the control's boundaries. Disabling the image might work, but setting the background pattern is cleaner.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm
Location: Winnipeg, Canada

Re: Cant select objects over image when in pointer mode

Post by raugert » Mon Apr 09, 2018 5:22 pm

Sorry for the late reply. I didn't check my post for activity.. jacque is right in that I'm using the engine behaviour for grabbing objects. I had put an image on the card and indeed it would block the grab handler (even if i set it to "can't select). I didn't try to disable it. That might have worked, but the set background worked out well for me.
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”