LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic menu question

HI,
I am dynamically updating the run-time menu, such that the choices constantly keep changing. So how do I account for the handling of them considering I do not know what they will be ahead of time (I know they will be numeric)? Do I need to use Get Menu Info? Mainly what do I label the case statement since I will not know that submenu item will be selected?
0 Kudos
Message 1 of 2
(2,102 Views)
> I am dynamically updating the run-time menu, such that the choices
> constantly keep changing. So how do I account for the handling of them
> considering I do not know what they will be ahead of time (I know they
> will be numeric)? Do I need to use Get Menu Info? Mainly what do I
> label the case statement since I will not know that submenu item will
> be selected?

If I understand correctly, you have menus that are being
built dynamically. The tags for the menu will be numeric
strings. That means that one thing you can switch on is
the string itself. You will have a case statement with
the possible strings already programmed into it.

Another option is to convert the selected menu string
into a number and use a case with ranges or comma lists
to divi
de up the items however you like.

Greg McKaskle
Message 2 of 2
(2,102 Views)