LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

menu with submenu in front panel

Hi,

I have some Enum controls in my code where each of them includes 3 items. I'm trying to build a drop down menu in the front panel and include all these controls. Obviously the items in each control would be sub-items in this situation. Any suggestions to do this?

 

Note that I don't want to use Run-time menu. It makes a lot of problems when building the application file. 

 

Thanks

0 Kudos
Message 1 of 11
(4,307 Views)

You mean like a nested drop down menu? So something that functions like the "File" menu in standard windows applications? Without using the runtime menu I'd say the best way to do that would be to call a .NET object. I don't believe anything like that exists natively in LabVIEW so you'd have to build it yourself. Probably worth your time to call the MenuStrip object and make sure it's running in a non-docked mode. I've done this in .NET forms but never in LabVIEW, and because this isn't supported functionality it's going to take some experimenting to get up and running, but it should do what you're asking!

0 Kudos
Message 2 of 11
(4,298 Views)

A little unclear with what you want to accomplish?... maybe use tabs, which you could programmatically change based on what your enums are.  You could nest tabs in tabs and set them as transparent and change them in your code?

0 Kudos
Message 3 of 11
(4,294 Views)

Thanks Kevin. Yes, the nested drop down menu is what I'm looking for. Unfortunately I'm not familiar with .NET, so that won't be an option for me.

Do you think that it's possible to make such a menu by customizing Enum controls? 

0 Kudos
Message 4 of 11
(4,289 Views)

I'm using these Enums to control some tabs. The problem is that I want something like menus in standard windows applications, but this menu is at the middle of the front panel and not at the menu bar.

0 Kudos
Message 5 of 11
(4,283 Views)

Unfortunately that idea goes somewhat contrary to what enums are. They're really just simple associative maps. The fact that the operate the way they do from a GUI perspective is really hard coded in. You could always build a custom. control whose behavior is governed in LabVIEW. This would be much more difficult than learning to import a .NET form object I believe. If the "look" doesn't matter as much, you can use a tab control (which operates like an enum for controls) and clusters, but you won't get a nested drop down menu that way.

0 Kudos
Message 6 of 11
(4,281 Views)

hi,

 

I think you should use .Net Toolstrip. I've created a toolkit for that so it is very easy to use. Link: Here

In the example you can see how to use toolstrip as a replacement of LV RTM but It can be used as an individual control and I think this could solve your problem.

-----

Machine Vision Techniques & LabVIEW Solutions - The solution is Yours!





0 Kudos
Message 7 of 11
(4,228 Views)

 Just throwing out an idea here - brainstorming style:

 

Another possibility - but it will take a lot of programming - is to use a tree control and expand the branches as you mouse-over them. It does not quite look the same as a nested menu, but it would be possible and could get you the data you need. All LabVIEW native too.

 

Rob

0 Kudos
Message 8 of 11
(4,217 Views)

Hello, hknima!

 

It looks like this forum's been resurrected somewhat after the fact. It also looks like you received some good advice from Kevin back in May (and some recent advice from mvTech and Robert Cole), and I wanted to see if this is still something you're working on. If so, let us know and we'll be happy to help.

 

Thanks!

 

Will Hilzinger | Switch Product Support Engineer | National Instruments
0 Kudos
Message 9 of 11
(4,196 Views)

Thank you guys for your comments and sorry for my late reply. I'm not working on this anymore. However I appreciate your time. 

0 Kudos
Message 10 of 11
(4,172 Views)