-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have seen some threads regarding this problem, but no definitive answer that works for me, so I thought I would post this question again.
Is there a way to get a long text to wrap within a listcell?
I have tried using the multiline property on the textbox but that does not cause the text to wrap.
Here is my zul code. The long text is in the Comment column.
<listbox id="lbComments" rows="0" multiple="true"> <listhead> <listheader label="ID" visible="false"/> <listheader label="Comment" /> <listheader label="Date/Time" width="150px"/> <listheader label="User ID" width="150"/> </listhead> </listbox>
Here is my composer code:
new Listcell(com.id.toString()).setParent(listItem) Listcell lc1 = new Listcell() Textbox comTextBox = new Textbox() comTextBox.width = 1000 comTextBox.value = com.pwricmt_comment comTextBox.inplace = true comTextBox.multiline = true comTextBox.setParent(lc1) lc1.setParent(listItem)
Thanks for any help!
It seems that it's not wrapping of text that you're dealing with, it's fitting a textbox component with a fixed width into a listcell. Maybe you could just set the width of the comment column to accommodate the textbox.
Richard,
Thanks for your response!
Since some of these texts are quite long, I have decided to try a textarea in place of the fixed width textbox since the textarea will wrap automatically.
Now I have a simpler problem. I need to widen the textarea but I do not see a width attribute on the textarea as there was on the textbox. Any ideas as to how to expand the width of the textarea?
Thanks!
Asked: 2012-01-11 18:07:35 +0800
Seen: 303 times
Last updated: Jan 12 '12