12-23-2008 08:28 PM
Hi,
How do i change the color of text when show connect & normal color when disconnect??
Attach with vi here.
Thanks and Regards,
Simon
12-23-2008 10:17 PM
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...
12-24-2008 12:06 AM
Hi Mike,
Thanks to reply.
Why execute one time, the "connect" still show normal color & need to execute again to take effect??
simon
12-24-2008 12:15 AM
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...
12-24-2008 12:39 AM
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
12-24-2008 12:49 AM
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...