hello
I am building a chat client with a listbox
I want that each client will choose his own text color in the chat
I did it in this way:
void cc_ReadMsgEvent(MessageFormat card)
{
UpdateListBox(card.ToString());
listBox1.ForeColor = card.myColor;
}
However, when I do it, it changes the color of all the text in the listbox, and I want to change the color
only of one line each time. how can I do it ?
thank you
Loading

FroglegRank #1,020 · 1.9K reputationPosted May 14, 2011, 12:13 AM EDT
Anil KumarRank #367 · 6.8K reputationPosted May 13, 2011, 4:23 AM EDT
VulpesRank #55 · 29.2K reputationPosted May 13, 2011, 5:05 AM EDT
gavriel ankri36 reputationPosted May 13, 2011, 11:14 PM EDT
can you show me how to change the color depending on what the user choosed ?
I mean how can I fit card.MyColor into this code ?
thank you!
gavriel ankri36 reputationPosted May 13, 2011, 11:19 PM EDT
Anil KumarRank #367 · 6.8K reputationPosted May 14, 2011, 1:53 AM EDT
Since you are working on chat screen, use lightweight ListBox. But if you are looking for appearance/style etc. then go for ListView.
Anil KumarRank #367 · 6.8K reputationPosted May 14, 2011, 1:57 AM EDT
Praveen KumarRank #4 · 79.9K reputationPosted May 14, 2011, 1:58 AM EDT