10-28-2010 02:58 PM
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?
Solved! Go to Solution.
10-28-2010 03:19 PM
I have not tried it but an invisible button over the subpanel might work.
Lynn
10-28-2010 03:24 PM
You can register for dynamic events on a subpanel reference. It's odd that the events don't show up in the event structure.
10-28-2010 03:52 PM
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. 🙂
10-28-2010 04:27 PM
You can register events for an array of subpanels, and switch actions based on the ctrl reference.
10-28-2010 04:30 PM
Matt--
This is a good solution and one that is like my JS analogy. Thanks for your helpful suggestion. 🙂
kc64