LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Closing the popup

Hi,

    I ahve attached an VI In that i made one Sub Vi(POPUP.vi) to pop up in the screen i have one Button(DONE) to close the popup.If i close the Vi by clicking the red X button in the Right Top corner of our window page the sub Vi(POPUP.Vi)is not closing  and giving the control to main Vi which is called.My question is can we take the property of the res X close button and make use it to close the Vi.

Download All
0 Kudos
Message 1 of 6
(4,964 Views)

In order to close the sub-VI, you must configure it for this behaviour :

open sub-VI >> CTRL+I >> Category = Window Appearance >> Customize... >> Check Show front panel when called and Close afterwards if originally closed

 

Doing so, the sub-VI will always behave like this by default.

 

But you can also set its behaviour for one particular node :

open main VI >> right-click on sub-VI >>  SubVI Node Setup... >> check option according to the expected behaviour

 

Feel free to post back if this shouldn't answer your question.

Message Edité par JB le 10-22-2008 03:59 PM
0 Kudos
Message 2 of 6
(4,956 Views)
Hi i know that properties pa.by using that only i made the sub Vi to pop up.see my Demo Vi by changing the option and close by Done button the main Vi will close If u close by X button in window .the main Vi will still Run since the sub Vi does not return its Control
0 Kudos
Message 3 of 6
(4,945 Views)

Unless you trap the X in the Corner, it closes the window and doesn't let your LV code know that it is happening. This is your problem.

 

To trap the X, use the '<This VI> -- Panel Close?' event. See attached...

 

Randy

Download All
0 Kudos
Message 4 of 6
(4,926 Views)

You could customize the vi properties, windows appearance to disable allowing the user to close the window. This will grey out the x.

 

Hope this helps

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 5 of 6
(4,921 Views)
Hi it is working fine thank you ya
0 Kudos
Message 6 of 6
(4,905 Views)