LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make one enum depend on the selection of another?

Suppose I have 5 enums, say A, B, C, D, E. Each has entries different from the others. I'd like to have a 2nd enum with the entries "A,B,C,D,E". When the user selects one of the 2nd enum entries, I'd like the user to be presented with the corresponding enum from the group of 5.

 

The context is this: the 2nd enum has entries like "Status Register" and "Event Register", and 3 others. Each register has different bits, like "motion complete" and "forward limit". I'd like the user to be able to select the register in one enum, and show that register's bit names in the other enum.

 

-Jeff

0 Kudos
Message 1 of 3
(2,404 Views)

You can always use Invisible Tabs with 'Page Display' visible.

 

InvisibleTab.PNG

0 Kudos
Message 2 of 3
(2,397 Views)

You could also use Rings as the controls on th efront panel. When the user selects the group programmatically change the value of the ring. You would need to keep track of the current group selection so that when you actually use the value from the ring you can typecast it back to the correct ENUM type and value.

 

Another option would be to show/hide the controls based on the group selection.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 3
(2,393 Views)