scripting items in a group

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
sn4fu
Posts: 4
Joined: Mon Mar 23, 2015 11:46 pm

scripting items in a group

Post by sn4fu » Tue Sep 08, 2015 11:10 am

Hi I have a large group graphic objects, these individual 'cells' can be coloured individually on mouseup.

What I need to do is reset them all to white, ok i can repeat thru each item in the group and it works but as there are a 1000 items this is very slow.

So i tried to set the fillfore of group id . . . and I the first time i did this it worked very quickly.

However returning to the stack I find this no longer works, am I going mad, done something silly or Did I imagine that it worked in the first place?

Or is there a better way to reset all items of a group?

regards t

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: scripting items in a group

Post by Klaus » Tue Sep 08, 2015 12:30 pm

Hi sn4fu,
sn4fu wrote:... i can repeat thru each item in the group and it works but as there are a 1000 items this is very slow.
even if you LOCK/UNLOCK the screen?


Best

Klaus

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

Re: scripting items in a group

Post by jacque » Tue Sep 08, 2015 5:27 pm

Most visual properties like color and text follow an inheritance path like scripts do. If an object has no color assigned it will inherit the color of its owner.

To reset all the graphics, run your scanning handler once more and set the color to empty. After that they should inherit the color of the group.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply