LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change color in string indicator

Hello all,

I tried to change a color in a text indicator and i attached the problematic vi.
The problem is that i can change a spesific text in the string but every time i am trying to color another line in the text the all text return to its "magor" color except the text i chose the last update, this is a problem because  i want to have many lines in many colors in the text.

someone has an answer?
0 Kudos
Message 1 of 4
(3,193 Views)

Hi Alvarion_Israel,

as far as i know, the style get lost if you add a new text to the indicator. So one solution could be to store the style changes and edit the text after adding the new text. Here is an example for you. I hope it helps.

Mike



Message Edited by MikeS81 on 02-17-2008 08:50 AM
0 Kudos
Message 2 of 4
(3,179 Views)
    Thanks for you answer,

ur solution is great but my indication will be with alot of chars can be 50000 lines so the for loop will become slower and slower with each line to mark.

0 Kudos
Message 3 of 4
(3,172 Views)
Hi Alvarion,

are you sure you want to present 50000+ lines of (colored) text to the user in a single string indicator? How long/often should/will the user scroll that text?

Why don't you do this:
Keep the text in a wire (or shift register). Even better would be to have an array of strings, each string representing a line.
Present just a portion of the text to the user, let's say 20 lines. To do so you just index the lines from the array.
This way you have some (just a little) more overhead when maintaining the string(s), but very little overhead in the string indicator itself (only limited number of lines, colors still controllable, doesn't take a lot of time to change colors).


Message Edited by GerdW on 02-17-2008 07:30 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 4
(3,158 Views)