Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Textarea with flexible row-length, How?

 
wei Qiao
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
wei Qiao
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
It is difficult to free fools from the chains they revere - Voltaire. tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!