Multiple objects drag and drop

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
lbtony
Posts: 35
Joined: Tue Apr 11, 2006 9:01 am

Multiple objects drag and drop

Post by lbtony » Thu Sep 20, 2007 10:06 am

Can anyone tell me the logic/program process of doing this?
I want to use ctrl+mouseup to select multiple objects(mainly image objects). How can I indicate on an image object when it's selected? In Runrev development mode, when I select an object, its dashed outline appears. Is it possible to implement this?

Klaus
Posts: 13878
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Post by Klaus » Thu Sep 20, 2007 12:42 pm

Hi ibtony,

quick idea:

You set the bordercolor of your images to RED or something and the showborder to true.

Will of course only work if your images do not have their border shown already... ;-)

On the other hand you can have the same behaviour as in the IDE if you:
set the selected of img 1 to true

Don't forget to deselect your images later!

Maybe that gets you started.


Regards

Klaus

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Sep 20, 2007 1:32 pm

Hi IBtony,

I can think of many ways to make an image look selected. You could mask it with a graphic object showing a rectangle in the same colour as the hilitecolour, or make an object that looks the same as Rev's drag handles, or set the blend of all images to 50 except the selected image(s), or show a picture of a checkmark inside the image, and so on. Probably, it would be best to store the name or ID of the image in a global variable when its appearance changes to selected. I'm sure we could invent more ways to do this. You might want to have a look at other applications to see how they do this. Note that the Mac Finder and Win Explorer provide excellent examples: these systems show different states of selected pictures all the time!

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply

Return to “Talking LiveCode”