LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

changing text colour

Hi,

 

How do i change the color of text when show connect & normal color when disconnect??

Attach with vi here.

 

Thanks and Regards,

Simon 

0 Kudos
Message 1 of 6
(2,878 Views)

You are basically pointed in the right direction. You just need to update the contents of the indicator before you start manipulating the colors. Also you need logic to set the color for the disconnect cases.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 6
(2,863 Views)

Hi Mike,

 

Thanks to reply.

Why execute one time, the "connect" still show normal color & need to execute again to take effect??

 

simon

0 Kudos
Message 3 of 6
(2,852 Views)

Turn on execution highlighting and I believe that you'll see that the problem is that the string 2 value is being updated after the colors are set. The colors will change as they should until the text changes, at which time the color of all the text changes back to the indicator's default text color. As I said in my earlier post, make sure the indicator updates before changing any of the colors and you should be fine.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 6
(2,849 Views)

Hi,

 

I still not clear the Update the indicator as you mentioned, but i work out as show in my attachment & still the same.

 

thanks and regards,

Simon

0 Kudos
Message 5 of 6
(2,843 Views)

What I mean is that the code first sets all the colors and then after that is all done, writes the string value to the indicator outside the case structure. Rearrange the code such that you write the string to the indicator before you manipulate any of the colors. Also the property you added has no effect because string 2 is an indicator. It is only for controls and it does something completely different.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 6
(2,836 Views)