From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change captions of multiple items on Front Panel

Solved!
Go to solution

Hi all,

I want to put Language function in my program by changing the captions programmatically, but it becomes annoying when there are many items to control (as attached picture). I have to create lots of property nodes one by one for all the items which I want to change the captions . Is there any easier way to do this?

 

Thanks for any help.

 

Ian

0 Kudos
Message 1 of 6
(2,658 Views)
Solution
Accepted by IanYuan

Hi hsyuan,

 

Is there any easier way to do this?

Yes, sure!

Use a property of the pane(l) to get references of all controls in this pane(l)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(2,632 Views)

@GerdW wrote:

 

Is there any easier way to do this?

Yes, sure!

Use a property of the pane(l) to get references of all controls in this pane(l)…


And also get the references from all pages in each tabcontrol, and each control in each cluster. That's where recursion comes in handy (you can have clusters in clusters in pages etc.).

0 Kudos
Message 3 of 6
(2,610 Views)

MGI has a VI called "Get VI Control Ref[]".  It returns an array of control refs, including controls found within a tab control.  If it sees a cluster, it returns the cluster ref but not the controls inside the cluster.  You should be able to use this VI as a starting point and add some functionality for clusters, if necessary. 

 

Edit - Don't modify the MGI version, but that should go without saying. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 4 of 6
(2,590 Views)

GerdW 已寫:

Hi hsyuan,

 

Is there any easier way to do this?

Yes, sure!

Use a property of the pane(l) to get references of all controls in this pane(l)…


Hi GredW,

 

Sorry I am a new hand in LV and can't figure out how to do this. Is there any detailed document or link that I can read for reference? It'll be great if sample code is available. Thanks for your reply!

 

Ian

0 Kudos
Message 5 of 6
(2,571 Views)