Page 1 of 1

Dynamicaly Add and Remove Itemxs drom Layout on CTRL

Posted: Tue Aug 24, 2021 8:09 am
by Victor.Ermakov
How to get Layout Items from on CTRL?
How to get count of Layout Items from on CTRL?
How to add Item to end of Layout on CTRL?
How to remove Item from Layout on CTRL?

I found only the function LAYOUT.boxInsertItem(shape item, int idx)

Re: Dynamicaly Add and Remove Itemxs drom Layout on CTRL

Posted: Fri Aug 27, 2021 9:42 am
by AdrianSan
Hi Victor,

Not sure if its helps, but have a look at the functions addSymbol and removeSymbol. With them you can add references to Layouts, and the position in the layout can be specified by the "index" parameter.
When you use removeSymbol, the layout is reestructured again.
Not sure about how to get the count, but in my case I am using a Class that does the symbol management, and keeps track of what is present and what is not.

BR