How to bring specific module into focus (Activate event)

Find and share HowTos to various installations / configurations!
7 posts • Page 1 of 1
vedadramovic
Posts:121
Joined: Mon Apr 07, 2014 10:36 am

How to bring specific module into focus (Activate event)

Post by vedadramovic »

Hello,
is there a command or function to bring module on top of all windows?

Please have in mind that our module uses control function stayOnTop(). It stay on top until some exception happens in some other application and it "overtakes" comes onTop.
So I need something to bring module on top again after this scenario happens.

Thanks in advance,
vedad

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: How to bring specific module into focus (Activate event)

Post by mkoller »

Try moduleRaise()

vedadramovic
Posts:121
Joined: Mon Apr 07, 2014 10:36 am

Re: How to bring specific module into focus (Activate event)

Post by vedadramovic »

Hi Martin, Thank you for fast answer and help.
moduleRaise() does not work.

I have tried moveModule() and stayOnTop().
It works if I use it inside the module i want to move or to bring on top.

If used moveModule("Vision_1", 100, 100) or stayOnTop(true, "Vision_1") inside of some other module besides the one I want to move/(bring on top) or inside control module, exception is raised (doe not work).
It seems to me that I am not using good module name. I used myModuleName() to obtain module name. This name I used in control script but without success.
Do I need to use User Interface (UI) name + module name, or something similar?

Is there a way to moveModule or to set stayOnTop() by module name from control script or some other module?

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: How to bring specific module into focus (Activate event)

Post by mkoller »

Every Module has it's own name. You need to pass the name of the module you want to change.
Always using myModuleName() will of course only change the module in which the script is executed.

vedadramovic
Posts:121
Joined: Mon Apr 07, 2014 10:36 am

Re: How to bring specific module into focus (Activate event)

Post by vedadramovic »

Hi Martin, thank you for your will to help.

I have used myModuleName() to obtain exact name of desired module written in log.
once I have it, I used it in functions:
stayOnTop()
moveModule()
moduleRaise()
panelPosition()

but it does not work. it is throwing exception "Function not defined moveModule",or any of mentioned functions above that comes first in control script.

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: How to bring specific module into focus (Activate event)

Post by mkoller »

There must still be a problem in your code when you get an error with moveModule() since the only error this functiona can generate is when you pass an unknown module name.
You probably get in contact with our support and provide them your example panels showing the problem.
This is then simpler to analyze.

vedadramovic
Posts:121
Joined: Mon Apr 07, 2014 10:36 am

Re: How to bring specific module into focus (Activate event)

Post by vedadramovic »

I will, thank you Martin

7 posts • Page 1 of 1