LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

changing caption text radio button

I don't seem to be able to pull out the right code to programatically change the caption text of a radio button. I can change the caption text for the overall radio control, but not for the individual buttons. I get error 1320, can't set property node for a control part that has not been created.

 

Any suggestions?

~~~~~~~~~~~~~~~~~~~~
Paul Johnson
Renco Encoders, Inc
Goleta, CA
~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 1 of 7
(3,827 Views)
That is because you do not have the caption turned on.
Tim
GHSP
0 Kudos
Message 2 of 7
(3,824 Views)

Oops!

 

Thanks. Thought I did, guess it was the boolean text instead!

~~~~~~~~~~~~~~~~~~~~
Paul Johnson
Renco Encoders, Inc
Goleta, CA
~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 3 of 7
(3,819 Views)

I am having the same problem. I have run the code with the caption turned on but am still getting the same error - did you manage to get it working in the end Paul?

0 Kudos
Message 4 of 7
(3,473 Views)

Hi,

 

I just tested the code posted in the first post of this forum post. I get error 1320 until at right-click on the second radio button (inside the cluster, not the cluster itself) and make the caption visible. Then the property node is able to find the caption for the specified refnum and change it correctly.

 

Are you getting different behavior with the code in this post? 

0 Kudos
Message 5 of 7
(3,460 Views)

McKM,

 

As Alisha P pointed out you must manually turn on the caption before you can programmatically modify it. Pop up on the control on the front panel and select Visible Items >> Caption.  Note that this makes the caption visible and sets its value the same as the label AND it makes the Label invisible.  The documentation is rather poor on this issue.

 

Lynn

0 Kudos
Message 6 of 7
(3,456 Views)

Thanks for your help - this worked perfectly - as you said I was making the caption for the cluster visible instead of each individual radio button - silly me!

0 Kudos
Message 7 of 7
(3,444 Views)