Dynamicaly Add and Remove Itemxs drom Layout on CTRL

Find and share HowTos to various installations / configurations!
Search

Post Reply
2 posts • Page 1 of 1
Victor.Ermakov
Posts: 25
Joined: Fri Oct 20, 2017 8:50 am

Dynamicaly Add and Remove Itemxs drom Layout on CTRL

Post 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)

AdrianSan
Posts: 13
Joined: Thu Aug 27, 2020 5:17 pm

Re: Dynamicaly Add and Remove Itemxs drom Layout on CTRL

Post 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

Post Reply
2 posts • Page 1 of 1