Highlight all objects on a card (old HyperCard trick)

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
mluka
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 73
Joined: Sun Jun 17, 2007 12:08 am
Location: Montréal, Canada

Highlight all objects on a card (old HyperCard trick)

Post by mluka » Thu Nov 23, 2017 8:56 pm

Hi all.

(Just trying to move from the 20th to the 21th century, here...)

In the old HC days, you used to be able to highlight all the objects on a card with a keyboard shortcut.

My fingers think that it was the combination "Cmd-Option".

Does an equivalent exist in LC, do you know???

Thanks.
Michel
Montréal, Canada

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Highlight all objects on a card (old HyperCard trick)

Post by bogs » Thu Nov 23, 2017 10:04 pm

Whatever works for 'select all', on linux/windows it would be ctrl + a, on mac i think it is command-A.
Image

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

Re: Highlight all objects on a card (old HyperCard trick)

Post by dunbarx » Sat Nov 25, 2017 2:07 am

I am working on a project where I have to select many objects at once, but not all. Many of these controls are interleaved with others, and it is hard to select them by hand. I use a few tricks.

A handler that chooses the pointer tool, loops through all flds, say, and clicks, with shiftKey, on the loc of those with a certain property. This way I can select controls that might be tightly intertwined with others.

A mouseEnter handler in the card script that will change or set a property, again, based on an existing property. So I can drag the cursor across a section of a card, and only those flds who's name contains, say, "circuit" will have a property changed.

It is just using LC to manage LC.

Craig Newman

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

Re: Highlight all objects on a card (old HyperCard trick)

Post by jacque » Sat Nov 25, 2017 6:04 pm

If the same set of controls is never or rarely moved, you can set their cantselect property to true which allows the enclosing drag to work. The cantselect items won't be included.

There's also cmd-clicking lines in the app browser but that gets tedious if there's a lot of controls.

Or your handler could set the selected property of the controls to true instead of simulating clicks.

Many ways to solve things in LC. That's the beauty.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: Highlight all objects on a card (old HyperCard trick)

Post by dunbarx » Sat Nov 25, 2017 7:03 pm

Jacque.

You know, I never thought about the "selected" property. That is very nice.

And that there even exists a property than circumvents what most people think about selecting objects, that is, clicking on them. This always feels like an ephemeral event that requires something special (holding down the shiftKey) to be able to select more than one. That a property allows that sort of event to "stick", is, as I mentioned, very nice.

Craig

mluka
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 73
Joined: Sun Jun 17, 2007 12:08 am
Location: Montréal, Canada

Re: Highlight all objects on a card (old HyperCard trick)

Post by mluka » Sat Nov 25, 2017 8:26 pm

bogs said: on mac i think it is command-A
Yes it is.

However, I'm not enthusiastic about that approach, for two reasons:
  1. Clumsy fingers could damage things badly with all objects selected...
  2. Invisible buttons remain invisible and are not selected. If memory serves me right (it don't always...), I often used that "peek" function to locate invisible buttons...
Things change. (Sigh...)
Michel
Montréal, Canada

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Highlight all objects on a card (old HyperCard trick)

Post by bogs » Sat Nov 25, 2017 8:49 pm

mluka wrote:
Sat Nov 25, 2017 8:26 pm
bogs said: on mac i think it is command-A
Yes it is.
However, I'm not enthusiastic about that approach...
Well, I'm not sure what the difference is between that approach and the one you initially listed, but read on intrepid fellow... :mrgreen:
dunbarx wrote:
Sat Nov 25, 2017 2:07 am
I am working on a project where I have to select many objects at once, but not all. Many of these controls are interleaved with others, and it is hard to select them by hand. I use a few tricks.
Hm. You reminded me that I had completely forgotten to mention the application and project browsers (doh). I can only think that it was because the initial question was 'select all', and ctrl / a is the quickest way I know to do that :roll:

In either of them, you can select multiple controls holding down ctrl (or equivalent) and clicking ( as Jacque mentioned). I usually fall to the project browser, though, since that one allows you to click one control, hold shift, and highlight all the controls in between when you click on the last control. On the other hand, the application browser lets you do a lot of things very easily, like setting visibility, or sorting by control name. Either will also let you see and select controls that are visible or not.
Image
Image

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”