LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

listbox text colour

Hi!
 
Recently I have put an array data in a one column listbox to view the data and what I would like to do is to highlight a word in the listbox.
I know that I can use the prop. node to change the colour of the text in a whole row but I don't know if there is a way to just change the colour of a word in one of the row.
 
In order to do that, I have tried to use different colour text to build an array before put it in the listbox but it cannot work. Other than that,
I also tried to convert the array to string then change the colour of one of the word then put the whole string in the listbox.It also doesn't work.After that , I have tried to find if there is some prop. node that is similar to the string control that have the start and stop text selection but I cannot find any prop. that is similar.
 
Actually is it possible to do that?Smiley Sad
 
Thanks in advance.
 
Io  
0 Kudos
Message 1 of 4
(3,437 Views)

Yes, it is possible to change font colour on one row in a listbox, see code sample below

BR

Sture

http://forums.ni.com/attachments/ni/170/313287/1/listbox_font_colour.JPG


ooops, now I saw that you wanted too change colour of just one word in a row... No, dont think it is possible in a list-box


Message Edited by sture on 04-03-2008 12:09 AM

Message Edited by sture on 04-03-2008 12:10 AM



Message Edited by sture on 04-03-2008 12:13 AM
0 Kudos
Message 2 of 4
(3,426 Views)

Thanks for your reply.

Yes.I would like to change just one word in the row.Smiley Tongue

Io

  

0 Kudos
Message 3 of 4
(3,410 Views)

Hi Io,

I do not think it is possible to change one specific word in a listbox.  If you try to set the word to the desired color, and then build an array from it, the color setting does not remain because the property is set for that particular indicator or control.  For this reason, you are limited to the properties outlined by the listbox.

If this is an important feature for you, you can submit a product suggestion at Contact NI.

Regards,

Lauren

Applications Engineering
National Instruments
0 Kudos
Message 4 of 4
(3,375 Views)