Layers in the UI?

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
n_lev
Posts:73
Joined: Tue May 28, 2013 2:24 am

Layers in the UI?

Post by n_lev »

Hi,

I am trying to use layers to hide/show certain things on my graphics and seem to have issues with it.

For example, I've created a small panel for a valve. This panel contains a few objects like button, polygon, rectangle, etc. I've defined all the scripts and $-parameter for this panel. This panel will then be inserted into a big panel as panel reference, $-parameter will be assigned a value. I was hoping to hide/show this object on the main panel using PanelOn/PanelOff. To my surprise, there is no "Layer" property on a panel reference. It seems like I have to define "layer" for every little object inside my valve panel and I cannot change it after the panel has been inserted as a panel reference. Is that correct?
If so, it means every time I want to use my valve panel as a reference, it will be using the same layers. Which means it's not really a library object.
Am I missing something? Can I actually change the layer of a panel reference? Or maybe dynamically change the layer of the objects inside of it?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Layers in the UI?

Post by leoknipp »

Hello,

the layer information for the objects in a panel cannot be changed during runtime.
If a reference is inserted the objects inside of a reference are inserted in that layer defined at the panel file.

With the CTRL-functions addSymbol/removeSymbol a complete reference can be added/remove to/from a panel during runtime.
You can also set the reference invisible with setValue("reference name","visible",0);

Best Regards
Leopold Knipp
Senior Support Specialist

n_lev
Posts:73
Joined: Tue May 28, 2013 2:24 am

Re: Layers in the UI?

Post by n_lev »

Thanks Leopold,

Will have to use the last option - setting the visibility of the whole panel reference object.
I didn't realize one can do it since it does not come up when you start typing in the script after the ".", nor it is visible in panel reference object properties. But it does the trick. Thank you!

3 posts • Page 1 of 1