05-05-2020 10:10 AM
I am using LabVIEW 2016. This will used in an Executable. I would like to be able to change the labels on the Cluster of each Boolean Control. Channel Selection Cluster has 16 Controls named CH1 ... CH16. I have a string of Channel Names that I would like to use to replace the Channel Selection Boolean Control labels.
Solved! Go to Solution.
05-05-2020 10:20 AM
Hi bassinbc,
generic rule: you cannot change the label of a control at runtime! So right now there is no way to change those "CH1" labels programmatically.
But: you can change the caption of a control - but you need to create it once before trying to change the caption. You can use property nodes to access the caption of each button…
Another approach: hide the label of the buttons in the frontpanel and place a string control next to each button. Now you can change the value of each string more easily than to access captions by references…
05-05-2020 10:23 AM
Here is an example of what Gerd was talking about.
05-05-2020 10:28 AM
Please change to 2016 version
05-05-2020 10:34 AM - edited 05-05-2020 10:34 AM
Sorry
05-05-2020 10:43 AM
Thanks.
05-05-2020 10:44 AM
You are welcome. One thing to remember moving forward is that you need to turn on the caption before you can change it. If you do not turn on the caption then you will get an error that tells you that the caption does not exist.
05-05-2020 11:41 AM
One thing that is a bit annoying about captions is that, once you turn them on for a given object, you cannot turn them back off.
05-05-2020 11:57 PM
@billko wrote:
One thing that is a bit annoying about captions is that, once you turn them on for a given object, you cannot turn them back off.
I'm curious - what is the downside of Captions being turned on?
I find it annoying that they have to be turned on to access them in the first place
(and that this can't be done at run time).