LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I develop a ring-control with sub-menus?

Hello,

I want to develop a ring-control with sub-menus like the windows start-menu with the sub-menus "Programms, Search ...".
Has anyone an idea how I can manage this?

Thanks for your replys.
0 Kudos
Message 1 of 32
(7,831 Views)
You can use a menu ring control for your first main menu. Then each item of that menu would have a sub-menu ring control of its own. You would then use a case structure for the main menu, and have all of the sub-menu rings initialized to be not visible. When you select an item from the main menu ring, make the corresponding sub-menu ring visible and enabled, so you can then use it. If you select a different main menu item, then make its corresponding submenu ring visible, and all the others not visible. If you really just want the functionality, but not necessarily the same appearance, you could also look into tree controls. Hope this helps!

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 2 of 32
(7,824 Views)
Is there a more graceful solution to this problem then just a case structure?

I am looking to create a menu of menus, so basically when I select a menu option, that option displays another menu of more options. I would rather not use a case structure in which im setting visibilities of other menus. Is there a way I can change the values of the "top" menu to be menus instead of strings, so that when I select them another menu will pop up?  Or is the case structure the only solution readily available?

NOTE: The menus I want to create are on my Front Panel... not the runtime menus on the window bar.

Thanks in advance.

Matt
0 Kudos
Message 3 of 32
(7,690 Views)
You could have a look at the implementations done here. Those were right mouse button clicks but you should probably be able to use them as well.

___________________
Try to take over the world!
0 Kudos
Message 4 of 32
(7,688 Views)
Maybe use the code from the above link, and instead of using a right click to pop up a menu, use a mouse over? Then specify coords for the area in the main menu for the mouse over... so that when you mouse over a submenu option, it pops up with that submenu option's menu?

Yikes... this seems complex... I didn't relize nested menus was such an issue. Especially so when you want 17 submenu options on yur main menu.  Smiley Sad

The functionality that I am currently working on, is having a pull down menu on my main VI, which will then open reference to the VI's the menu references to. They pop up, I set all the functions I want in the VI that popped up. Close it, which returns back to the main VI again, where I have the option of making another menu selection. This is the best most intuitive I've come up with so far.  Tried using subpanel to display the VI's but I like the pop up better.

Message Edited by MJBrehm on 05-26-2006 03:21 PM

0 Kudos
Message 5 of 32
(7,681 Views)
Hello all,
once I made some VIs based upon those mentionened here (to read LabView RTM- Files) and here  (to create a Popup menu in Windows). Perhaps this is easier to use, because you can create the menu with the LabView Menu-editor (very fail-save) and don’t have to bother about placing the ring control, windows does it for you.
You can build up the menu at runtime, merge menu- parts to the main- Popup menu at desired position, here the complete "edit"- branch is inserted under the "open"- menu item.
Here are some pictures of the features.





Maybe this is helpful to some of you.
It should be mentioned (and this is the biggest disadvantage of this solution) that ist only works with Windows.
Dave

Message Edited by daveTW on 05-28-2006 02:12 AM

Message Edited by daveTW on 05-28-2006 02:14 AM

Greets, Dave
Message 6 of 32
(7,664 Views)
And btw, does anybody know a way to add some small icons to a Windows Popup menu? I was searching a while ago but found no good solution.
Dave
Greets, Dave
0 Kudos
Message 7 of 32
(7,608 Views)
If you have a real Window popup menu, you can add an icon to a menu item by API.
 
I created a library for popup menu includes a VI for this purpose.
 
 
George Zou
 
George Zou
Message 8 of 32
(7,597 Views)

I have a same problem! Did you find a solution?

 

---
+++ In God we believe, in Trance we Trust +++
[Hungary]
0 Kudos
Message 9 of 32
(6,465 Views)

LabVIEW now allows you to edit the context menu for controls. You should be able to access it by right clicking the control and selecting the relevant option (probably in the Advanced menu). You should be able to use it using the event structure and I assume there's an example in the example finder (Help>>Find Examples).


___________________
Try to take over the world!
0 Kudos
Message 10 of 32
(6,454 Views)