Page 1 of 1

Adding items to a group using code

Posted: Wed May 28, 2008 3:35 pm
by andyh1234
Another question im afraid - sorry!

I have an existing group, Id like to create some more rectangles using code (easy enough), but then put the rectangles in an existing group.

The code im using to create the rectangles is...

set the style of the templategraphic to rectangle
set the name of the templategraphic to "test"
set the left of the templategraphic to 0
create graphic

What would I need to add to make the new rectangle be part of an existing group called 'grpBack', or is it just best to kill the old group and recreate it with the group command?

Thanks

Andy

Posted: Wed May 28, 2008 3:55 pm
by Klaus
Hi Andy,

you are almost there:

Code: Select all

...
set the left of the templategraphic to 0 
create graphic in grp "name of grp here"
...
:-)


Best

Klaus

Posted: Wed May 28, 2008 6:01 pm
by andyh1234
Thanks Klaus!

Andy