LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controls Property Array being defined as an ENum

HI,  I have an example of an event handler that I am attempting to use with my menu.  I am using the controls[] property for the VI Panel and all is well with its execution.  The problem that I have is that I am going to have lots of controls and do not like the way that I have to use strings for the case structures using labels.text to determine what control to handle.  TYpically, I like to implement enum types for controls so that the case structure compares the numbers yet displays the text for code readability. 
 
Is there a way to systematically convert teh controls[][ property to an enum type for this purpose?
 
 
0 Kudos
Message 1 of 2
(2,476 Views)
Enum values can't be set when the VI is running, so they have to be set at edit time. You can write a VI which will extract the names of the controls into the Strings[] property of an enum and then copy that enum into your VI, but the enum will be out of date if you change your controls.

___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(2,474 Views)