Page 1 of 1

scripting items in a group

Posted: Tue Sep 08, 2015 11:10 am
by sn4fu
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

Re: scripting items in a group

Posted: Tue Sep 08, 2015 12:30 pm
by Klaus
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

Re: scripting items in a group

Posted: Tue Sep 08, 2015 5:27 pm
by jacque
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.