how to make top level window.

Find and share HowTos to various installations / configurations!
Search

Post Reply
8 posts • Page 1 of 1
jinwonds
Posts: 12
Joined: Thu Oct 05, 2017 7:58 pm

how to make top level window.

Post by jinwonds »

Hello,

I made popup screen using child panels with different names in the same module.
if popup screen is already opened, I want to bring this popup screen on top of all window.

I searched in help file, I found a few functions. ( moduleRaise() , stayOnTop() )
But these two function are operated using the module name.

So, Is there any same function(moduleRaise()) that using panel name ?

gschijndel
Posts: 373
Joined: Tue Jan 15, 2019 3:12 pm

Re: how to make top level window.

Post by gschijndel »

You could try to set the 'windowFlags' property of the panel to "WindowStaysOnTopHint".

jinwonds
Posts: 12
Joined: Thu Oct 05, 2017 7:58 pm

Re: how to make top level window.

Post by jinwonds »

Thank you for answer.

But, could you explain 'windowFlags' property again?
I tried to find it in help file, but I couldn't.

gschijndel
Posts: 373
Joined: Tue Jan 15, 2019 3:12 pm

Re: how to make top level window.

Post by gschijndel »

The list of window flags is listed in the documentation under: Graphics editor (GEDI) -> The Property Sheet -> Properties and events of the panel (qthelp://wincc_oa/doc/Native_GEDI/Referenz_Native_GEDI-21.htm)

The function 'childPanel' contains example code: CONTROL -> Control functions -> Functions C -> childPanel (qthelp://wincc_oa/doc/ControlA_D/childPanel.htm)

The question how to use the 'windowFlags' panel has already been asked in this forum: Window / Panel Properties via CTRL
Another topic contains example code: Trying to hide minimize and maximize buttons

LIGO
Posts: 27
Joined: Tue Aug 02, 2016 1:57 pm

Re: how to make top level window.

Post by LIGO »

Hi,

Enabling that flag would make a panel always on top. And I'm not sure if it's possible to disable that flag during runtime.

Just want to mention that there could be a possible problem that the most of system panels are not using that flag (for example, error messages). You should keep in mind a situation when you have your "always on top" panel getting stuck because of a modal window appeared behind it. I'm using 3.15, maybe something has been changed in later versions.

Best Regards
Leonid Solovev

jinwonds
Posts: 12
Joined: Thu Oct 05, 2017 7:58 pm

Re: how to make top level window.

Post by jinwonds »

All, Thank you for giving information.

I tried to use WindowStaysOnTopHint of windowFlags ,but it was still not working my project. (WinCC OA 3.14)
and there is no information about WindowStaysOnTopHint in help file(Graphics editor (GEDI) -> The Property Sheet -> Properties and events of the panel).

and, "always on top" doesn't seem to fit my concept I'm trying to make.

My purpose is just to bring the specification childpanel forward when a specific event occurs (Ex: click the open button).
I already knew the module name and panel name of childpanel. (All childpanel uses the same module name.)

So, Is there a function to bring the childpanel forward using the module name and panel name?

LIGO
Posts: 27
Joined: Tue Aug 02, 2016 1:57 pm

Re: how to make top level window.

Post by LIGO »

Yeah, that "windowFlags" property was introduced in 3.15, that's why you couldn't find it.

Unfortunately, I don't know a nice way of bringing the panel on top but there are functions to look at:
- setInputFocus() might help if you have some common shape on your child panels but I'm not sure if that would work if your panel is not "activated" (= already on top)
- there is "windowState" property of the panel and it seems like you can activate the window by sending "WindowActive" to that property
- "windowVisible" property of the panel would bring that panel on top while changing it to FALSE and then to TRUE

Notice that the last 2 points are described in the same chapter of help and probably were introduced in 3.15 as well.

BR, Leo

User avatar
leoknipp
Posts: 2926
Joined: Tue Aug 24, 2010 7:28 pm

Re: how to make top level window.

Post by leoknipp »

If you open the panel with ChildPanelOnModal() or any other child panel function with "Modal" the panel will be on top and it will be the only panel you can work with.
When the module which has opened the panel is "on top" (stayOnTop) it will probably fulfill your requirements.

Best Regards
Leopold Knipp
Senior Support Specialist

Post Reply
8 posts • Page 1 of 1