05-11-2011 02:07 PM
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
05-12-2011 12:01 PM
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!
05-12-2011 12:11 PM - edited 05-12-2011 12:12 PM
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?
05-12-2011 12:13 PM
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?
05-12-2011 12:19 PM
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.
05-12-2011 12:21 PM
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.
01-08-2012 04:27 AM
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.
01-08-2012 09:01 AM
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
01-09-2012 03:08 PM
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!
01-14-2012 10:48 AM
Thank you guys for your comments and sorry for my late reply. I'm not working on this anymore. However I appreciate your time.