Hi all,
anybody knows if addSymbol can be used to add a reference inside a tab's registerpanel? If it is, what's the syntax?
Using addSymbol inside the registerpanel (initialize) adds the reference to the panel instead the tab registercard, where the function was called from. So the reference (in this case a button) is visible, independet which registerpanel is selected.
Br petr
Using addSymbol inside a tab\'s registerpanel
- RudiKreiner
- Posts:198
- Joined: Mon May 16, 2011 2:10 pm
Re: Using addSymbol inside a tab\'s registerpanel
To use addSymbol in register panel tabs, you need to pass myPanelName() to the parameter panelName, instead of a just an empty string there. That is described in the WinCC OA help, in the description of the addSymbol() parameters.
- peka
- Posts:19
- Joined: Wed May 15, 2013 4:46 pm
Re: Using addSymbol inside a tab\'s registerpanel
Hello Rudi,
thanks for fast reply.
Yes, now i see it, clever as i was i just checked the common description and hint section...
thanks for fast reply.
Yes, now i see it, clever as i was i just checked the common description and hint section...
- AliBou
- Posts:25
- Joined: Wed Mar 28, 2018 3:57 pm
Re: Using addSymbol inside a tab\'s registerpanel
doesn't work for me 3.16 ?
- peka
- Posts:19
- Joined: Wed May 15, 2013 4:46 pm
Re: Using addSymbol inside a tab\'s registerpanel
I haven't tested it yet, but according to help you also have to use myModuleName
"In order to add an object in a tab, the both parameters have to be replaced by the functions myModuleName() and myPanelName(). If an empty string "" is used instead of myPanelName(), so the tab is used as this panel."
"In order to add an object in a tab, the both parameters have to be replaced by the functions myModuleName() and myPanelName(). If an empty string "" is used instead of myPanelName(), so the tab is used as this panel."
- AliBou
- Posts:25
- Joined: Wed Mar 28, 2018 3:57 pm
Re: Using addSymbol inside a tab\'s registerpanel
I already make it in initialise script of tab:
addSymbol(myModuleName(),myPanelName(),"objects/test.pnl","test",makeDynString(),50,50,0,1,1);
addSymbol(myModuleName(),myPanelName(),"objects/test.pnl","test",makeDynString(),50,50,0,1,1);
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: Using addSymbol inside a tab\'s registerpanel
It works in the following ways:
1) when you have your script inside the panel inside the tab, use addSymbol(myModuleName(), "", ...); // panel name as empty string
2) when you have your script outside of the tab, use addSymbol(TAB1.panelAt(0), ...); // insert on panel at tab index 0
1) when you have your script inside the panel inside the tab, use addSymbol(myModuleName(), "", ...); // panel name as empty string
2) when you have your script outside of the tab, use addSymbol(TAB1.panelAt(0), ...); // insert on panel at tab index 0
- AliBou
- Posts:25
- Joined: Wed Mar 28, 2018 3:57 pm
Re: Using addSymbol inside a tab\'s registerpanel
Thanks for your response
It's still not working !!!
i tried both methods inside and outside the Tab
addSymbol(myModuleName(),"","objects/test.pnl","test",makeDynString(""),50,50,0,1,1); inside tab
addSymbol(myModuleName(), TAB1.panelAt(0),"objects/test.pnl","test",makeDynString(""),50,50,0,1,1); outside tab
the object is added but in the panel not in the Tab ??
It's still not working !!!
i tried both methods inside and outside the Tab
addSymbol(myModuleName(),"","objects/test.pnl","test",makeDynString(""),50,50,0,1,1); inside tab
addSymbol(myModuleName(), TAB1.panelAt(0),"objects/test.pnl","test",makeDynString(""),50,50,0,1,1); outside tab
the object is added but in the panel not in the Tab ??
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: Using addSymbol inside a tab\'s registerpanel
I tested it with the attached panels. open the addRefToTab.pnl
Tested with 3.16 P2 https://www.winccoa.com/fileadmin/image ... 181026.zip
Tested with 3.16 P2 https://www.winccoa.com/fileadmin/image ... 181026.zip
- Attachments
-
- panels-20181026.zip
- (2 KiB) Downloaded 279 times
- AliBou
- Posts:25
- Joined: Wed Mar 28, 2018 3:57 pm
Re: Using addSymbol inside a tab\'s registerpanel
Thank's