LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger panel close? event using boolean control in the VI

I want to trigger the panel close? event by using certain boolean control so is it possible to do that?

 

Thanks,

0 Kudos
Message 1 of 4
(3,989 Views)

You will need to dynamically register an event.

 

Refer to the labview\examples\general\dynamicevents.llb for examples

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 4
(3,987 Views)

That's not quite the same thing. Registering for an event isn't the same as triggering an event, which is what the user is trying to do. You can dynamically register/unregister events, but this basically allows you to change what an event structure listens to. It still has to receive the event. The Panel Close? event is an event that gets fired when the user clicks the "close" box in the window's title bar or if the user closes the window. Unfortunately, the FrontPanel.Close method doesn't trigger this event (WHY?), so I think** the only way to do this is to use the OS. For example, on Windows you can use the PostQuiteMessage. Too bad that this doesn't work with LabVIEW. So, I think** that you have to use the equivalent keyboard command to close a window.

 

Attached is an example in 8.2 that does this, using a SendKey llb that I found someplace (can't remember where). 

 

** Meaning I may be wrong on this being the only way.

Download All
Message 3 of 4
(3,963 Views)
I agree...I did mis-read the post. Thanks for the info and apologies for the confusion.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 4
(3,952 Views)