02-23-2016 10:32 AM - edited 02-23-2016 10:37 AM
@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.
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> ---'
02-23-2016 10:35 AM - edited 02-23-2016 10:46 AM
@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
02-23-2016 10:38 AM
Hi,
Thanks for the solution. I tried some work around. But the previous strings are in default colors. Any ideas to make it work.
02-23-2016 11:01 AM
@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> ---'
02-23-2016 11:12 AM
>> 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.
02-24-2016 02:20 AM
Hi,
I tried with the for loop but the program really works very slowly.