LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

discard

Hi,
I would like to know what is the function discard is doing on a panel close user event in an event structure, what is the difference when you wire a  boolean value TRUE or FALSE to this value in a panel close? user event.
does it inhibit the action of closing the windows if you wire a TRUE constant to this value in the event case panel close?
please could somebody explain me what exactly is it doing?

THanks a lot

Olivier
0 Kudos
Message 1 of 2
(3,152 Views)

The "Panel Close?" event is called a Filter Event. The question mark after the name signifies it as a Filter Event. Filter events let you throw event away or handle them differently.

Your assumption on what it does is correct. If you wire a True to the Discard terminal, the user will not be able to close the window by clicking the normal "X" window button in the upper right of the Window. You can use this function to actually allow the user to click the "X" window button to close an application and instead of the window just closing, you can discard the close and run your normal shutdown code and then programatically close the window.

Ed



Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 2
(3,140 Views)