Window Focus lost behind other windows

doing this in the “main” window

if event.button == event.BUTTON1: fpmi.nav.openWindow('Cooling Unit Status Display', {'UnitString' : param1, 'TagPath' : param2, 'dbPath' : param3}) fpmi.nav.centerWindow('Cooling Unit Status Display') else: fpmi.nav.openWindow('Cooling Unit Status Display2', {'UnitString' : param1, 'TagPath' : param2, 'dbPath' : param3})

problem is once the user clicks back on the main window to open the opposite window, the 1st one opened is “underneath” the main window.

How can i check to see if the window is open, and bring it to the top if open ???

Thanks !

rthomas,

You should be able to switch focus back by executing the same code again (i.e., clicking on BUTTON1) from the “main” window. If the window is already open, it will receive the focus.

Yes, thats right, calling openWindow on an already open window will bring it to the front.

Just in case you were simply asking about how to do it manually - you can always use the “Windows” menu to the left of the “Help” menu to see your open windows.