• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Textarea with flexible row-length, How?

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
reply
    Bookmark Topic Watch Topic
  • New Topic