LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Panel Control [ ] Value Change Event does not fire

My intentions is to use the mouse down Event for a UI on the Main VI to close a pop up subVI. The jpg shows the subvi which I want to close once the user clicks on the Main VI.

I don't understand why all other dynamic events fire (like menu activation n Value Change) but Mouse Down does not. I already created an event for this but it never fires. See attachment.

Thx
richjoh
0 Kudos
Message 1 of 9
(3,612 Views)
!!! Correction on the topic it should read:

Panel Control [ ] Mouse Down Event? does not fire
0 Kudos
Message 2 of 9
(3,609 Views)

Hi richjoh,

Thanks for contacting National Instruments.  I have been looking at your question and I am a little confused why you are using the Register For Events function.  Would you be able to simply place an event structure on your block diagram and then edit the cases from there? I have also attached a link below that may help you out with configuring your events.  I hope this helps you out some and let me know if you have any more questions. Thanks!

http://zone.ni.com/devzone/cda/tut/p/id/3331

Regards

Noah R
Applications Engineering
National Instruments
0 Kudos
Message 3 of 9
(3,533 Views)
Hi Richjoh,

could you show more of the code?

Is the Pane ref valid?
Does the Register for event throw an error?

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 9
(3,504 Views)

HI Ton P,

The reference is valid, I get no errors when I run this... This code is an Help "About" Box that I what to pop up then go away when the user clicks on the pane of the top VI. As you can see, I am taking the Pane Refnum from the top level VI and dynamic register it to the Event Structure.

My only guess is this Event Stucture I show is executed inside and an Event Structure... I don't know if nested Event Structures is a problem... but this doesnt explain why the other dynamic events fire (like the dyamic "menu" and "value change controls").

richjoh

Download All
0 Kudos
Message 5 of 9
(3,495 Views)
Well are you sure the pane is valid..

Where do you fill the HornCalcRef cluster?
Maybe you should just take the pane-ref from the VI ref you have in the same cluster.
What does a probe say on the pane-ref (which hex number?)
I'll try to build something similar tonight

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 6 of 9
(3,462 Views)


@richjoh wrote:
 As you can see, I am taking the Pane Refnum from the top level VI and dynamic register it to the Event Structure.

My only guess is this Event Stucture I show is executed inside and an Event Structure...



Well I don't see that you actually use the Pane Refnum from the top level VI but the following code works for me (I know this is not like yours)



But I think you got a point with the nested Event structure, this shouldn't be problem IF you uncheck the box 'Lock front panel ...' in the main VI. Checking this box will prevent the UI from be usable and fire events (just what you experience here)

Ton

Message Edited by TonP on 10-02-2007 06:21 AM

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 7 of 9
(3,442 Views)
Hi TonP.
Regarding your posted code, the pane is defined as anywhere on the UI corrrect? So when you run your VI and click anywhere on the FP your "mouse down" event is fired correct?
 
In my attached jpg above, all the references or properties are for the top level VI "HornFP.vi". The cluster "HornCalcRef" has the top level vi, "HornFP.vi", ref and its panel ref. When I get time to go back to this I'll try to get my VI ref from VI property node (shown) instead of using the cluster " HornCalcRef".
0 Kudos
Message 8 of 9
(3,332 Views)
I was able to get this working by using the VI panel reference wired to Pnl Panes[] reference property wired to the Register events. Now when I click on the top level VI the About VI closes... Why this doesn't work with the Pane Refnum from the cluster, I don't know.
 
I found out Panel property does not have a mouse down event, it must be a pane property for mouse down event.
 
 
0 Kudos
Message 9 of 9
(3,315 Views)