Dynamic panels

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
tashimov
Posts:1
Joined: Fri Feb 16, 2018 5:16 am

Dynamic panels

Post by tashimov »

I want to add a shape to the panel at run time and I use this code:

Code: Select all

string shape_type = "PRIMITIVE_TEXT";
string shape_name = "NEW_PRIMITIVE_TEXT";

shape new_shape = addShape(myModuleName(), myPanelName(), 1, shape_type, shape_name);
new_shape.text = "HELLO WORLD!";
How can I remove this shape?

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Dynamic panels

Post by mkoller »

You can only set it to invisible. There is no removeShape function.

adaneau
Posts:310
Joined: Tue Feb 21, 2012 9:49 am

Re: Dynamic panels

Post by adaneau »

Hi,

Otherwise you can make yourself a library of objects and add/ remove them using addSymbol / removeSymbol :)

3 posts • Page 1 of 1