LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Events in empty sub-panels

Solved!
Go to solution

I have a user interface concept that I'm investigating.  The end application is to monitor the status of some parameters in equipment racks.  Since there is limited space on the screen and since there are so many racks, I thought it might work for the client to be able to click on an empty sub-panel in an array of sub-panels on the user interface and be prompted for the name of the rack that should have its information displayed there.  When the selection is made, the miniature front panel for that VI would be placed in the sub-panel.  My experiment, however, shows that there does not appear to be any events on sub-panels.  Is there any way to do this other than by using the coordinates of the mouse click in the Pane event?

0 Kudos
Message 1 of 6
(2,629 Views)

I have not tried it but an invisible button over the subpanel might work.

 

Lynn

0 Kudos
Message 2 of 6
(2,618 Views)

You can register for dynamic events on a subpanel reference. It's odd that the events don't show up in the event structure.

0 Kudos
Message 3 of 6
(2,613 Views)

These are both interesting options.  The problem with using dynamic event registration is that it requires a priori knowledge of the number of sub-panels that will be used.  This is not a problem by my original statement but I have plans to script this process later on so I will now focus my attention on how to script a new sub-panel and insert a VI into it.

 

Having used JavaScript in a browser environment, there is a method called event bubbling that allows the object to handle any event enacted upon it.  If that event handler is absent, the event "bubbles" up to the next level in the DOM tree and continues to do so until a handler is found to process the event.  This is the sort of thing I was looking for in LV.

 

Thanks to both of you for your comments and suggestions. 🙂

0 Kudos
Message 4 of 6
(2,599 Views)
Solution
Accepted by topic author kc64

You can register events for an array of subpanels, and switch actions based on the ctrl reference.

 

 

sub panel events 2.png

0 Kudos
Message 5 of 6
(2,586 Views)

Matt--

 

This is a good solution and one that is like my JS analogy.  Thanks for your helpful suggestion. 🙂

 

kc64

0 Kudos
Message 6 of 6
(2,581 Views)