To make sure I understand, where you wrote "large field of small rectangle graphics", did you mean "large group of rectange graphics", or are these images displayed in a field object?M-A Kuttner wrote: ↑Thu Nov 17, 2022 9:12 pmThanks guys! The project is that I have a large field of small rectangle graphics butted up against one another, and I want to select any subset of them within the larger field so as to access the names of each. However, I don't want to reposition any of them.
Is a selection rectangle possible?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Is a selection rectangle possible?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Posts: 50
- Joined: Mon Apr 03, 2017 3:55 pm
Re: Is a selection rectangle possible?
Sorry. I refer to it as a field to the users. It is indeed a large group (but not a Group) of graphics, each of which is sequentially numbered according to column and row.
Hypertalk developer on and off since the days of SuperCard. Currently using LC to do rapid prototyping for a new kids' toy.
Re: Is a selection rectangle possible?
@Richard.
Yes, I used the actual pointer tool, and I wished I did not have to. I also think there should be a better way.
@ M-A Kuttner
If you have a bunch of controls scattered around, and I hear they are closely spaced, how are you going to set the bounds of your selection rectangle? Normally you would need to drag the pointer tool, right?
But if you want to do this from "above", how do you know? Can you click, perhaps with the optionKey, at the upperLeft and lowerRight corners and use those locs to set the react? That would work, and be far easier that typing in four integer items. It would be, as I mentioned to Richard above, a better way, and you do not have to change tools.
Craig
Yes, I used the actual pointer tool, and I wished I did not have to. I also think there should be a better way.
@ M-A Kuttner
If you have a bunch of controls scattered around, and I hear they are closely spaced, how are you going to set the bounds of your selection rectangle? Normally you would need to drag the pointer tool, right?
But if you want to do this from "above", how do you know? Can you click, perhaps with the optionKey, at the upperLeft and lowerRight corners and use those locs to set the react? That would work, and be far easier that typing in four integer items. It would be, as I mentioned to Richard above, a better way, and you do not have to change tools.
Craig
-
- Posts: 50
- Joined: Mon Apr 03, 2017 3:55 pm
Re: Is a selection rectangle possible?
Yeah, that's how I'm doing it right now, and that does work. I was just wondering if there was a way to make that a more intuitive experience to the users (who are users of graphics applications).
Hypertalk developer on and off since the days of SuperCard. Currently using LC to do rapid prototyping for a new kids' toy.
Re: Is a selection rectangle possible?
It always takes a while for everyone to get what is going on. This is normal.each of which is sequentially numbered according to column and row.
Are these controls arranged in a grid? In that case, click on the upperLeft and lowerRight ones with, say, the optionKey, and you are done.
Craig
Re: Is a selection rectangle possible?
Hmmm.
Are these graphics all the same size?
Craig
Are these graphics all the same size?
Craig
-
- Posts: 50
- Joined: Mon Apr 03, 2017 3:55 pm
Re: Is a selection rectangle possible?
For context, here's what I'm talking about:
Hypertalk developer on and off since the days of SuperCard. Currently using LC to do rapid prototyping for a new kids' toy.
-
- Posts: 50
- Joined: Mon Apr 03, 2017 3:55 pm
Re: Is a selection rectangle possible?
The rectangles in the black area are all 8 x 20. There are somewhere north of 4,000 of them.
Hypertalk developer on and off since the days of SuperCard. Currently using LC to do rapid prototyping for a new kids' toy.
Re: Is a selection rectangle possible?
Whew.
Quite a few more than I thought. So how are you with clicking on the upperLeftMost and lowerRightMost rectangle, and nailing all the ones in between? I assume that one of the control keys should be held down when you do this to distinguish that process from any "normal" one.
Are you OK with writing the handler to do that, assuming that is how you want to do the selecting?
On another note, that is a handsome, if rather busy card you have there.
Craig
Quite a few more than I thought. So how are you with clicking on the upperLeftMost and lowerRightMost rectangle, and nailing all the ones in between? I assume that one of the control keys should be held down when you do this to distinguish that process from any "normal" one.
Are you OK with writing the handler to do that, assuming that is how you want to do the selecting?
On another note, that is a handsome, if rather busy card you have there.
Craig
-
- Posts: 50
- Joined: Mon Apr 03, 2017 3:55 pm
Re: Is a selection rectangle possible?
Haha - thank you Craig. It's turned into a much bigger beast than I was expecting when I started it a year ago.
Luckily it's an internal tool, so I don't have to worry about releasing it (and supporting it) to the general populace...
The handler already works. My question was more out of curiosity than necessity. What happens is that you select either the 4th or 5th tool down in the tool palette in the upper left, for copy or paste respectively. As you suggested, the user clicks the upper left and then the lower right rectangles that they want bounded, and the foregroundColor of each of those rectangles highlights in neon pink. Then the user clicks on the rectangle where they want to paste that block and voila!

The handler already works. My question was more out of curiosity than necessity. What happens is that you select either the 4th or 5th tool down in the tool palette in the upper left, for copy or paste respectively. As you suggested, the user clicks the upper left and then the lower right rectangles that they want bounded, and the foregroundColor of each of those rectangles highlights in neon pink. Then the user clicks on the rectangle where they want to paste that block and voila!
Last edited by M-A Kuttner on Thu Nov 17, 2022 10:14 pm, edited 1 time in total.
Hypertalk developer on and off since the days of SuperCard. Currently using LC to do rapid prototyping for a new kids' toy.
-
- Posts: 50
- Joined: Mon Apr 03, 2017 3:55 pm
Re: Is a selection rectangle possible?
In case it's not obvious, it's essentially a timeline based animation tool.
Hypertalk developer on and off since the days of SuperCard. Currently using LC to do rapid prototyping for a new kids' toy.
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Is a selection rectangle possible?
Nice UI. Is this for a lightboard?M-A Kuttner wrote: ↑Thu Nov 17, 2022 9:40 pmThe rectangles in the black area are all 8 x 20. There are somewhere north of 4,000 of them.
I'm assuming that the rect objects here change color when "selected", yes? That is, what you're after is effectively a form of "painting" by dragging across the rects, applying the currently selected color to their backColor, is that correct?
If so, I don't think you need object selection per se at all. I would imagine tracking a mouseMove handler that set the color of the mouseControl would suffice, no?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Posts: 50
- Joined: Mon Apr 03, 2017 3:55 pm
Re: Is a selection rectangle possible?
Thanks Richard. Yes, exactly. Each of the vertical pixel assignments (P01, P02, etc) corresponds to an LED in a light ring on the toy I'm helping with. The horizontal is 5 seconds, broken into 24 frames per second. You can select one or more of the "P" labels on the left to activate the corresponding lights and then either colour individual frames or do colour inbetweening over a range of frames to make some pretty nice animated arrangements that then play out on the ring. Here's a more detailed view of it in its full form:
And yes, this changes each rectangle's backcolor. The selection thing, as per my other message above, was more a nice-to-have that I was curious about rather than a needed feature.
And yes, this changes each rectangle's backcolor. The selection thing, as per my other message above, was more a nice-to-have that I was curious about rather than a needed feature.
Hypertalk developer on and off since the days of SuperCard. Currently using LC to do rapid prototyping for a new kids' toy.
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Is a selection rectangle possible?
I think mouseMove checking the mouseControl should cover what you need there. If you run into snags let me know.M-A Kuttner wrote: ↑Thu Nov 17, 2022 10:25 pmThe selection thing, as per my other message above, was more a nice-to-have that I was curious about rather than a needed feature.
The UI is cool enough that I would also like to suggest you consider writing a guest blog entry for LC. You can contact Heather at support AT livecode.com. They welcome guess blogs, and every backlink to you helps.
If nothing else, I'd get more backstory on this, and it's cool enough I'm eager to learn more.

Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Posts: 50
- Joined: Mon Apr 03, 2017 3:55 pm
Re: Is a selection rectangle possible?
Thanks again. I'd be happy to share. Just need to clear it with the crew here first.
That said, I'd be pretty embarrassed to show you the code. I'm not a programmer by training, and at the start I was getting back to a hypertalk-like language after many years away. Especially in the older features, it's a spaghetti factory in there.
But that said, almost everything does work, so the end result is what we needed. And the other guys who we asked about writing something told us they'd need a 10 Million dollar LED order in order to customize their software for us. So LiveCode really ended up fitting the bill for what we needed.
Also, a big thanks to everyone in the forums. This has to be one of the friendliest and most helpful places on the internet.
That said, I'd be pretty embarrassed to show you the code. I'm not a programmer by training, and at the start I was getting back to a hypertalk-like language after many years away. Especially in the older features, it's a spaghetti factory in there.

But that said, almost everything does work, so the end result is what we needed. And the other guys who we asked about writing something told us they'd need a 10 Million dollar LED order in order to customize their software for us. So LiveCode really ended up fitting the bill for what we needed.
Also, a big thanks to everyone in the forums. This has to be one of the friendliest and most helpful places on the internet.
Hypertalk developer on and off since the days of SuperCard. Currently using LC to do rapid prototyping for a new kids' toy.