LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Determining if any popup panels are active

I have looked through the user interface library and have not found anything obvious... Is there any way to determine if a popup panel is active?
 
I have a situation where I may get an abort message from an external souce that would shut down the test sequence in progress. When this message arrives, I would like to close any active popups and display the abort status.
 
Just doing a RemovePopup(1) call gives an error, I only want to call it if there is an active popup.
 
I could do something like this:
 
   SetBreakOnLibraryErrors (0);
   RemovePopup (1);
   SetBreakOnLibraryErrors (1);
But I really prefer to avoid such shnanigans.
 
 
Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 1 of 4
(3,262 Views)
Hi, MJF.

There are a couple of ways to do this. You could use GetActivePanel() to find out which panel is active, or you could use GetPanelAttribute() with the attribute ATTR_ACTIVE.

Heres the definition from the CVI help:

ATTR_ACTIVE

Type: Panel attribute
Description: Indicates whether the panel or one of its child panels is the active panel.

0 = Panel not active

1 = Panel active

Restrictions: Not settable.
Data Type: integer

Let me know if you have any more questions. Have a nice evening.
Sarah K.
Search PME
National Instruments
0 Kudos
Message 2 of 4
(3,243 Views)

Ah well, I was afraid somebody was going to say something like that. I was hoping for something very simple like a single function call that returns a 1 if there are active popups and 0 if not.

I'd see this as a nice feature to have in future, could we get it as a feature request for a future release?

 

Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 3 of 4
(3,218 Views)

Hi Martin,

I recommend submitting Product Suggeston for this feature.  This is a great way to let R&D know what features would make a big difference for you.

Best Regards,
Megan B.
National Instruments

0 Kudos
Message 4 of 4
(3,191 Views)