LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Deactivation parent panel when a popup opens

i am using installpopup and removepopup in my application to display and remove a child panel.

my question is that when i open a child panel then i dont want my parent panel to receive any events at any of my callbacks of parents panel and when popup is removed then parent panel is again activated. in simple words i want to deactivate my parent panel when a popup is installed.

thanks in advance

0 Kudos
Message 1 of 4
(4,658 Views)

Hello there!

 

I think the solution you are looking for is somewhere along the lines you just posted: using the InstallPopup LabWindows/CVI function.

Here are a few source where you can learn more about creating modal dialogs/panels, which are essentially stacked windows which block the input of the underlaying panels:

  1. The CreateProgressDialog is a Programmer's Toolbox function that creates a wait window for lenghty operations. You can look in the implementation of the function at <CVI Install Directory>\toolslib\toolbox\toolbox.h.
  2. Refer to the Creating Modal Pop-Up Panel In LabWindows/CVI KB: http://digital.ni.com/public.nsf/allkb/83EDCFB10FA8B8D2862565E7007EA350 for another handy sample application.
  3. Learn more from the InstallPopup help topic or the related sample applications: http://zone.ni.com/reference/en-XX/help/370051Y-01/cvi/uiref/cviinstallpopup/

Best regards!

- Johannes

0 Kudos
Message 2 of 4
(4,644 Views)

thanks alot for the answer , my dear friend this example shared does not fulfill my requirement as i have checked it , when a child panel is open using popup then if i click at command buttons of the parent panel then events are bieng generated which i dont want , actually i want my parent panel command button callbacks to be scilent and not checking for events if a child panel is active using popup.

thanks in advance once again.

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

Hello smartprogrammer, are you aware of this note from the help for InstallPopup?

 

Note Note  While you can pass a child panel to this function, it is not recommended. Although the panel will retain its status as a child panel, it will not behave like one while it is modal, which might produce unpredictable results elsewhere in your program.

 

Is there a special reason to use a child panel? Can you rethink your framework so that a regular panel is used?

 

 

 

Note: I suppose this discussion and this other one are strictly related: am I right?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(4,568 Views)