From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Bug? Switching the radio button style does not retain the enum values (=item labels)

A radio button control is a special cluster of booleans where only a max of one can be true at a time. The actual value is an enum with items corresponding to the labels of the booleans.

 

When reworking old code, one might want to change style, for example replace an existing "modern" radio button control with a "system" radio button control.

 

There seems to be the following bug:

 

When replacing an existing radio button control with a different style using "right-click...replace" ( e.g. modern->system, system->modern), almost everything is transferred in a reasonable manner (number of items, style of items, boolean text of items, label of radiobutton control, etc.) with one strange and unexpected exception:

 

The labels of all the items is lost and reverts to "Radio Selection 1", "Radio Selection 2", etc.

 

Since this causes a change in the underlying enum, all wires going e.g. to subVIs will immediately break and we need to tediously rename all the items to get the unbroken run arrow back (Especially tedious and error prone if we have the labels hidden and don't remember the exact spelling and capitalization of each item).

 

(I will file this in the monthly bug thread, this post here will be linked from it.)

 

 

0 Kudos
Message 1 of 5
(4,953 Views)

Actually, it is even worse than I thought:

 

If the radio button control has more than two items, only two items will be retained.

0 Kudos
Message 2 of 5
(4,939 Views)

 


@altenbach wrote:

When replacing an existing radio button control with a different style using "right-click...replace" ( e.g. modern->system, system->modern), almost everything is transferred in a reasonable manner (number of items, style of items, boolean text of items, label of radiobutton control, etc.) with one strange and unexpected exception:

 

 


I thought it was much worse than this, I don't seem to recall getting anything to transfer.  I wind up starting from scratch with two buttons and default labels.  I am mostly post-modern at this point (ie. all system) so I haven't tried this in LV10 yet, maybe it has gotten slightly, but not completely better.

 

Edit:  Apparently not.

 

Message 3 of 5
(4,938 Views)

I guess I did not notice the other problems because I only switched (redecorated) radio buttons with exactly two items. 😄

Here, the boolean text is retained, giving the false initial impression that everything is OK :()

 

Do you know if there is already a CAR for this?

0 Kudos
Message 4 of 5
(4,929 Views)

Hi altenbach,

 

I reproduced this and wasn't able to find any existing CARs on the issue, so I filed a new one (CAR 250151).

 

Thanks for the feedback!

 

Sincerely,

 

- Greg J

Message 5 of 5
(4,883 Views)