I am building an HMI screen in PAC Display with several main windows (switched with tabs), and a few different popup dialog boxes. I have an issue where when one of the dialog boxes is up and the user clicks past it to the main window and switches tabs, the dialog window moves behind the other windows with no way to bring it back. Even if the dialog window is closed and re-opened it opens behind the main windows. The only way I can see it is by closing all of the other windows and leaving the dialog by itself.
Is there any way to force a popup window to stay on top, or to bring it back to the front if it does get sent to the back?
I think some looking at your needs and workflow might help.
Specifically in the area of which type of window is really needed here.
Recall there are two types of âpopupâ windows. Child and Popup.
From page 97 of doc 1702 (PAC Display Users Guide).
Another option that might work for your operators is to have a button on your main window that simply brings that popup to front by opening it.
Page 417 this time.
Thanks very much for the suggestions, I have tried both âChildâ and âPopupâ behavior, and there doesnât appear to be any difference in how the window stacking behaves.
It sounds like you might have tried to close and open it from the menu?
I have been testing this by adding a series of buttons on the main screen that open/close/iconify the popup window, as well as changing the control engine variable that ordinarily triggers it to open (via a âWindow Managerâ). Those buttons affect the popup window using the method you suggested from Page 417.
Regardless, after the popup goes behind the main window, nothing I do can bring it back until I restart both PAC Display and the strategy running on the control engine. I can drag the main window to the side a bit and see the popup opening and closing, but itâs always behind the main window. Even clicking on the popup doesnât bring it to the front.
The main window tab buttons are what causes the popup to go behind. They open and close a number of windows (not including the popup window) to switch tabs. This is actually done with multiple âSend Discreteâ actions to flip some bits in a variable that controls the window state using Window Managers.
How is the draw order of Windows determined in PAC Display? Shouldnât the most recently opened window be in front?
Hmmm, you sure have tested the optionsâŚLets tag in @ccaldwell for this one.
While he reads up, what version of PAC Display are you on and what operating system?
Sorry, to be of little help here in this instance. Would you be willing to contact Opto 22 Support? That might be the surest way to resolve the issue youâre facing.
If youâre willing to share them, Opto 22 Support can open up your project files to see how things are configured. With any luck, they may be able to suggest a solution at that point. And if not, we can still escalate the problem to further levels of support to make sure it gets resolved.