Showing results for 
Search instead for 
Did you mean: 

Controlling Properties via Reference

Go to solution

I have a cluster of numeric controls. I would like to control the properties (Disabled, Visible, Value, NumText.Format and NumText.Precision) of these individual controls by passing one reference from the cluster on the main vi, to a sub vi.


Within my subvi I wire my cluster reference to the Controls[] property to get an array of references to the elements within the cluster that follow cluster elements order.


Using this array of references I find property options available for Disabled, Visible and Value properties, among others. There are no options, however, for controlling NumText.Format and NumText.Precision.


Any suggestions, or perhaps there another way to approach this?



Jim Haas
0 Kudos
Message 1 of 2
Accepted by topic author JHaas

The array of control references will be of a generic class, and therefore cannot have specific propertiies set. To gain access to the specific control properties you must cast to a more specific class first. If all the controls are of the same type, you can simply cast them all, using the "to more specific type", to numeric types. This should make the NumText properties available for setting.



Thoric (CLA, CLED, CTD and LabVIEW Champion)

Message 2 of 2