LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

control panels from different thread's

Hello,
I have a main panel that is running in the main thread. From a different thread, i want to open a popup panel. So, when the popup panel is shown, i can click on the main panel and then the popup panel is no more visible cause it's behind the main panel. How can i make the popup panel to always be above the main panel? How can I bring the popup panel to the front from within the main thread?
andy
0 Kudos
Message 1 of 2
(2,970 Views)
Hello Andy,

One of the restrictions of using the UI library from different threads is that panels are only modal relative to other panels in the same thread. This is described in the "Panels and Multithreading" section of the help.

If you need to initiate the display of a panel in a different thread, my recommendation is that, instead of calling InstallPopup from this thread, you post an event from to the main thread, using PostDeferredCall. Then, from the main thread, you can display the popup and it should behave the way you expect it to. You'll also need to post an event to the main thread in order to remove the popup.

Luis
NI
0 Kudos
Message 2 of 2
(2,962 Views)