0

How can I wrap the string in the table?

asked 2009-08-21 06:25:18 +0800

din gravatar image din
251 1 5

How can I wrap the string in the table?
I mean currently my application display the definition in a single line but I want to introduce a line break or wrap the string up.
How can I do that?

Thanks,
Dino

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2009-08-21 19:18:20 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2009-08-21 19:18:59 +0800

sclass="word-wrap"

and try a \n sequence in your text : "This is the \n\n second line"

Stephan

link publish delete flag offensive edit

answered 2009-08-22 04:25:19 +0800

joylo0122 gravatar image joylo0122
688 1
www.zkoss.org

@din

If it's possible to read HTML tag, you can also try to write the sentence like "Hello<br/>World".

/Joy

link publish delete flag offensive edit

answered 2009-08-22 06:13:36 +0800

baskaraninfo gravatar image baskaraninfo
536 2 2 9

Thanks terrytornado.
It works great for labels when placed inside grid row.

How can we make the grid column header with multiline string? Because, am having many columns in a grid and wants to display within a small portion.

Thanks.

link publish delete flag offensive edit

answered 2009-08-22 19:42:41 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

For multiline Headers look at my old thread here

regards
Stephan

link publish delete flag offensive edit

answered 2009-08-24 08:07:48 +0800

din gravatar image din
251 1 5

Thanks for all the posts, but the real issue with me is I am getting definition of few things and displaying those so can't introduce a line break or new line character in that case can I put a cap like after 100 words it should be in the next line or so?

link publish delete flag offensive edit

answered 2009-08-24 08:38:51 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2009-08-24 08:39:07 +0800

Hmmmmmmmm, you can write a small text-parser .

Parse the whole text and look for the count of signs for the first 100 words. and made than a linebreak.
Take the next count of signs with the remembered first line sign-counter and go back if to
the previous space sign. Add a linebreak to the string. These are the second line.
And so on.

regards
Stephan

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-08-21 06:25:18 +0800

Seen: 486 times

Last updated: Aug 24 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More