LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why can't I see the menu bar of a vi in a subpanel

As the title says, why can't I see the run-time menu of the VI I inserted into a sunpanel?
Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 1 of 10
(3,853 Views)
This is by design (and also stated in the LabVIEW Help). The subpanel only displays the front panel of the VI. The run-time menu is not considered part of the front panel.
0 Kudos
Message 2 of 10
(3,841 Views)

... However, if you really need access to a menubar, you can pass a reference to the calling VI's menu to the VI in the subpanel and manipulate it from there (create/delete menus, handle selections, etc...). Just be sure the plugin VI cleans up after itself when it closes.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 10
(3,800 Views)

I read the Help and understand it is on purpose, however why?

 

I have functionality in the Run-Time menu that I want the user to access. I ended up hacking the same functionality with a tab control. It doesn't look as nice but it gets the job done.

 

 

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 4 of 10
(3,705 Views)

The why is really rather simple: Logically a window can only have one menubar. So if you want a subVI to interact with a menubar that is the one it has to use and the way to get to it is through the menu reference from the top-level VI. In use this is actually a very clean and systematic way of implementing the functionality.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 10
(3,699 Views)
I know how to interact with menu items in multiple VIs programmically, however how do I display the subVI's RTM when it is placed in the subpanel so that the user can select the RTM items from the subVI?
Message Edited by doug@southerndaqsolutions.com on 01-05-2009 03:04 PM
Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 6 of 10
(3,691 Views)
Mike already gave you the answer in reply #3: pass a reference for the calling VI's menubar to the subVI, and have the subVI modify the parent VI's menubar.
0 Kudos
Message 7 of 10
(3,685 Views)

doug@southerndaqsolutions.com wrote:
I know how to interact with menu items in multiple VIs programmically, however how do I display the subVI's RTM when it is placed in the subpanel so that the user can select the RTM items from the subVI?
Message Edited by doug@southerndaqsolutions.com on 01-05-2009 03:04 PM

As explained you can't and LabVIEW does not allow this for a good reason. It is accepted knowledge in UI design and considered bad UI behaviour to have a menu other than a context popup or anywhere else than under the title bar.

 

LabVIEW adheres to that and most probably would have to jump through a few hops too to actually make this possible at all.

 

Rolf Kalbermatter

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 8 of 10
(3,681 Views)

No he didn't answer why, he just offered an alternate solution. However modifying the parent menubar wouldn't work in my case.

 

But thanks, this is all I was looking for "It is accepted knowledge in UI design and considered bad UI behaviour to have a menu other than a context popup or anywhere else than under the title bar."

Message Edited by doug@southerndaqsolutions.com on 01-05-2009 06:19 PM
Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 9 of 10
(3,668 Views)

Not to make too much of it, but I did tell you why: A subpanel can't have a menubar of its own because (to quote myself), "...Logically a window can only have one menubar...". Maybe not as classy as Rolf's statement - but then Rolf is a classier guy.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 10 of 10
(3,647 Views)