screen number

Find and share HowTos to various installations / configurations!
9 posts • Page 1 of 1
mku
Posts:11
Joined: Thu Apr 06, 2017 3:49 pm

screen number

Post by mku »

hello,
I'm trying to use function RootpanelonModule an I have a little problem.
I use following script:
main()
{ RootPanelOnModule ("fileName", "PanelName", "ModuleName_1", "")

I've got 4-screen workstation and I don't know what parameter should I use in ModuleName to display screen on current monitor, because if ModuleName have parameter 1 it doesn't matter on which monitor (1 or 2 or 3 or 4) I click button it always open on monitor 1.

thanks
Michal

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

Re: screen number

Post by leoknipp »

If a panel shall be opened in a specific module you have to address the correct module.
Where is the object located which shall open the panel on the same monitor?
Are you using one of the panel topology templates?

Best Regards
Leopold Knipp
Senior Support Specialsit

mku
Posts:11
Joined: Thu Apr 06, 2017 3:49 pm

Re: screen number

Post by mku »

Hello,
I created my own template that has basePanel, infoPanel and NaviPanel. In basePanel there are 3 widgets (infoModule, mainModule and naviModule). In naviPanel I created push_button with function like I wrore previously. With this buton I want to open new panel (root). When i click this buton on monitor 1 new panel should open in monitor1, when I clic on monitor 2 new panel should open on monitor 2 etc.

best regards
Michal

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

Re: screen number

Post by leoknipp »

In the standard templates the (screen)-number is passed to the base panel using a $-parameter.
The same $-parameter is then used to assign a unique module name to the embedded modules.
If you are using a similar concept you can use the $-parameter to get the information which screen the script is started on.

Best Regards
Leopold Knipp
Senior Support Specialist

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: screen number

Post by Gertjan van Schijndel »

Michal Kurowski wrote:
RootPanelOnModule ("fileName", "PanelName", "ModuleName_1", "")
If you use the same naming convention for the module names as the standard templates (suffix them with '_' and the screen id), you could this:

Code: Select all

RootPanelOnModule ("fileName", "PanelName", "ModuleName_" + ptnavi_GetScreenName(), "")

mku
Posts:11
Joined: Thu Apr 06, 2017 3:49 pm

Re: screen number

Post by mku »

Gertjan van Schijndel wrote:
Michal Kurowski wrote:
RootPanelOnModule ("fileName", "PanelName", "ModuleName_1", "")
If you use the same naming convention for the module names as the standard templates (suffix them with '_' and the screen id), you could this:

Code: Select all

RootPanelOnModule ("fileName", "PanelName", "ModuleName_" + ptnavi_GetScreenName(), "")
great, it works.
thank you very much.

best regards
Micha?

mku
Posts:11
Joined: Thu Apr 06, 2017 3:49 pm

Re: screen number

Post by mku »

hello,
As I wrote it works but only once. When I click buton panel opens but if I try to open another panel via another buton there is no reaction (nothing happens) and log is empty.
When I try to open different panel via buton which is configured via panel topology it works and after that i can open panel via buton but only once, after that another buttons doesn't worlks (only buttons from panel topology works)

best regards
Michal

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

Re: screen number

Post by leoknipp »

If a different panel shall be loaded in the same module you have to use a different panel name.
Maybe the panel name used in the function to load the panel is always the same and therefore it does not work.

Best Regards
Leopold Knipp
Senior Support Specialist

mku
Posts:11
Joined: Thu Apr 06, 2017 3:49 pm

Re: screen number

Post by mku »

hello,
It was my mistake, I was using the same panel name.
Now it works.
thank you

best regards
Michal

9 posts • Page 1 of 1