LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

default value of a radio button not showing when i execute the program

I was trying to change  the default value of a radio button in a panel from Off to On. The panel of radio button will appear after clicking a command button in main panel.  But when i excute the program and  the panel with radio button appear than it is always showing Off condition though default value i set it On.

 

I was thinking only in the UIR if i make default value of default from OFF to On, it will work. But it does not. Could any one help me out.

 

Thanks

 

arocon

0 Kudos
Message 1 of 3
(3,697 Views)

Strange behaviour you are seeing!

A radio button (the one in Toggle Button palette, not a toolbox radio group control) should always honour the default value (set in "Initial state" in control properties in the UIR editor), provided you have saved the UIR with the button set in the proper state and you are not changing it programmatically.

Can you double-check the panel you are using in the UIR editor? If the final application is on another disk or another folder may it be hat you have not copied the final UIR to the correct folder?

 

If all is correct, maybe you could reduce your project to the minimum possible that shows this behaviour and post is here?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(3,694 Views)

Why don't you set the control value before displaying the panel? Let the default value be whatever it is.

-----------------------
/* Nothing past this point should fail if the code is working as intended */
0 Kudos
Message 3 of 3
(3,687 Views)