Color
Author |
Message |
cedricb
|
Posted: Mon May 21, 2007 1:14 pm Post subject: Color |
|
|
Hi,
I'm currently doing a Chat room project for my grade 12 course and it is working perfectly. I want to add more features and I was wondering if it was possible to change the color of a text area per entry.
Example:
User test sends a message with the color blue
Every one receives it as blue
User test2 sends a message with the color red
Every one receives it as red and the message from test is still blue
Passing the variables is not a problem, I just can't find how to change the color per entry without changing the whole text area
Thank you,
Cedric |
|
|
|
|
|
Sponsor Sponsor
|
|
|
octopi
|
Posted: Mon May 21, 2007 5:19 pm Post subject: Re: Color |
|
|
I don't use java but my understanding was that you can format text fields with html tags, so you should be able to do
code: | <font color="#FF0000">TEXT</font> | for red text
code: | <font color="#0000FF">TEXT</font> | for blue text
You would just set it the value of the above (all of it), and it would only display the word TEXT, but in the color specified, you should also be able to bold it using |
|
|
|
|
|
cedricb
|
Posted: Thu May 24, 2007 9:05 am Post subject: Re: Color |
|
|
it would work for anything but textfields but thanks anyways |
|
|
|
|
|
|
|