LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

changing the boolean text of a control programatically

Hi all
 
I am trying to have 2 different languages for my application. So i am planning to shift to one language with a single button click. Captions of all controls and graphs on front panel getting changed. My problem is, i need to change the multiple strings in boolean text of a control. This is like, when i click on "start" button, its color gets chaged and display"stop" as on TEXT.  with property node i coulod change only ON text. i am unable to change both the ON and OFF text. 
 
Hope to get the solution for this.
 
Thanks all
 
Anil
0 Kudos
Message 1 of 8
(3,940 Views)
some thing to add to the above question. i Have few so many SUB VIs comes into the picture while using the application, so i am using global variable concept to change the language in those windows also. when i click on "English" button, a number will be saved in global variable, and when i open some window, that checks this global variable first , change all the captions and then display.................
 
is it OK, or is there any good programming technique for the above.
 
 
Thanks
Anil
0 Kudos
Message 2 of 8
(3,932 Views)

Hiii,

             If you are using two different cases true and false then use the property node in the both according to the text require, as you are mentioning the button, you are using the different cases for sure, so do it that way, it will work for sure.

Thanks,

Nishant

0 Kudos
Message 3 of 8
(3,933 Views)

hi nishant

 

i tried the same, but the problem it is changing OFF text only, it is not changing ON text.

0 Kudos
Message 4 of 8
(3,929 Views)
Don't use the Boolean Text properties. Instead, you need to modify the boolean's Strings[4] property.

___________________
Try to take over the world!
0 Kudos
Message 5 of 8
(3,929 Views)
hi
 
i am not getting what you trying to tell, can you explain me in detial. How to use this boolean's string[4] property.
 
Thanks
Anil
0 Kudos
Message 6 of 8
(3,926 Views)

It's explained in the help for it (just right click the property node and select Help for Strings[4]).

It's an array of strings - one for each state of the button (it has 4 states, yes, although you can't always see them), so you put the right strings in the array.


___________________
Try to take over the world!
Message 7 of 8
(3,924 Views)
hey
 
It solved my problem.
 
 
 
Thanks
Anil
0 Kudos
Message 8 of 8
(3,918 Views)