Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Color
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
cedricb




PostPosted: 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
Sponsor
sponsor
octopi




PostPosted: 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
code:
<b>text</b>
cedricb




PostPosted: Thu May 24, 2007 9:05 am   Post subject: Re: Color

it would work for anything but textfields but thanks anyways
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: