aspose file tools*
The moose likes Servlets and the fly likes Textarea with flexible row-length, How? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Textarea with flexible row-length, How?" Watch "Textarea with flexible row-length, How?" New topic
Author

Textarea with flexible row-length, How?

wei Qiao
Greenhorn

Joined: Jun 19, 2000
Posts: 23
Thanks for everyone answer my previous question and it works!
Now I need to make the TextArea a little nicer to show the context and varies on the row size. My context is from the database as a String field something like this:
front: 1-2
preface: 3-9
Text: 10-190
Can I?
David Freels
Ranch Hand

Joined: Feb 01, 2001
Posts: 102
I am pretty sure this is not possible with a textarea. Everything in a textarea is the same font and size. This may be possible using CSS, but I am not sure.
David
Sun Certified Programmer for the Java2 Platform
wei Qiao
Greenhorn

Joined: Jun 19, 2000
Posts: 23
Thanks, david
I meant to have different row size of the textareas for different record. I build the textareas in a for loop according to the size of the resultSet. Since some record has a empty field for what should be displayed in the textarea, it's a big blank area and ugly. That's why I like to fix it.
Thanks!
Phil Hanna
Ranch Hand

Joined: Apr 05, 2001
Posts: 118
Wouldn't an HTML table be easier to work with than a TEXTAREA here? You get the alignment and justification that you want without having to test the field widths. If you need input capability, you can put individual <INPUT TYPE="TEXT"> elements in the table cells.
------------------
Phil Hanna
Author of :
JSP: The Complete Reference
Instant Java Servlets


Phil Hanna<BR>Sun Certified Programmer for the Java 2 Platform<BR>Author of :<BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072127686/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">JSP: The Complete Reference</A><BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072124253/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">Instant Java Servlets</A>
wei Qiao
Greenhorn

Joined: Jun 19, 2000
Posts: 23
Yes, I did put the TextArea in a table cell. I have to use TextArea because the field has multiple lines and I don't want a unwrapped display. The TextArea might show nothing and it would be nicer to be able to control it's row size.
Thanks!
 
Don't get me started about those stupid light bulbs.
 
subject: Textarea with flexible row-length, How?