LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

InsertTextBoxLine with different text colours

Solved!
Go to solution

Dear all,

 

I am upgrading an application using CVI2009 and I would like to use InsertTextBoxLine function.

 

      InsertTextBoxLine (int panelHandle, int controlID, int lineIndex, char text[]);

 

I need to make clear two kind of lines for the user, green text lines and red text lines, so that the user can very easy see which info line is a good one and which one is a bad one.

 

Does anyone know how to insert the text line in a certain colour?

 

Thanks in advance,

 

0 Kudos
Message 1 of 7
(5,434 Views)

Maybe you can switch from a textbox to a listbox, see here

Also I would consider using different colors for some users might suffer from a red-green color blindness

0 Kudos
Message 2 of 7
(5,399 Views)

1) Maybe you can replace your textbox with a listbox, see here

2) Maybe you can choose different colors for some users might suffer from a red-green color blindness

0 Kudos
Message 3 of 7
(5,399 Views)

Hi,

 

maybe you can replace your textbox with a listbox, see here

 

You might also consider two different colors because some users might suffer from a red-green color blindness

0 Kudos
Message 4 of 7
(5,399 Views)
Solution
Accepted by topic author josete

Unfortunately the textbox control does not permit to change the text color, as well as any other text attribute, on some part only of its content.

There are some alternatives you can use, the simplest being probably the use of a listbox instead: see the help for ItemLable parameter in InsertListItem comand to understand how to obtain this. Look also at <CVI samples folder>\userinf\listdelx.prj example program for an example what you can obtain with this control.

Alternatively you could use a table control, maybe more flexible but a bit more difficult to program with.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 5 of 7
(5,415 Views)

Obviously, there was a malfunction of Lithium, I had posted my replies a few times but they didn't show, only now, four hours later Smiley Frustrated

0 Kudos
Message 6 of 7
(5,383 Views)

Indeed there was nothing when I posted my comment! Smiley Surprised



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 7 of 7
(5,377 Views)