LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change color of outgoing frame in string


@jay0909 wrote:

Nope it dosn't work. It changes only for the first row and rest is the same.


See how this code changes every other character to red or blue. See? It can be done, you just need to apply it to the lines you want to change.

Change Every Other.PNG

 

This takes some time, so if your string gets really long, you'll have issues.

 

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 11 of 16
(1,100 Views)

@Alexander_Sobolev wrote:

Is it just for display? I would use something like tree (for table, etc  you need to keep all messages separately)

Methods Add item to end, Active cell font color


A listbox would be much easier and there won't be any visual difference if you set it up correctly.

 

Use the following example, skip the CellBG part.

http://digital.ni.com/public.nsf/allkb/76DFBE75B8D31FFA86257057007DE2C9

 

Also,

http://forums.jki.net/topic/265-alternating-row-colors-in-multicolumn-listbox/#entry392


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 12 of 16
(1,095 Views)

Hi,

 

   Thanks for the solution. I tried some work around. But  the previous strings are in default colors. Any ideas to make it work.

0 Kudos
Message 13 of 16
(1,088 Views)

@jay0909 wrote:

Hi,

 

   Thanks for the solution. I tried some work around. But  the previous strings are in default colors. Any ideas to make it work.


Come on man... For the third time, the colors get reset every time you set the string value. You need to set the color of each line every time. Look at the For loop I gave you in my last post. See how it loops through the string multiple times and sets each color.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 14 of 16
(1,070 Views)

>> A listbox would be much easier and there won't be any visual difference if you set it up correctly.

To update a listbox, you need to build array programmatically and update the whole listbox. 

Tree is perfect for this display. When one message arrives, for tree you just add one item. Display is more powerfull Why anyone needs date for every message? Make dates lower indent items, and close old dates.

0 Kudos
Message 15 of 16
(1,065 Views)

Hi,

 

       I tried with the for loop but the program really works very slowly. 

0 Kudos
Message 16 of 16
(1,033 Views)