GWT - Label not wrapping text/resizing properly?
I've got Labels within the cell of a FlexTable inside of a ScrollPanel which is inside of LayoutPanels. The size of the ScrollPanel (and it's parent LayoutPanels) is set dynamically based on the size of the window of the user's device (so exact CSS sizing is not used). The FlexTable, it's cells, and the Labels are set to have a width of 100%. Also, the FlexTable is set to have a fixed table layout. And the Labels are given the word-wrap setting of break-word. In most cases, this works fine. Sentences with short words are wrapped to the next line without a problem and Label remains the same size as it's containing table cell. However, when a word would need to broken onto two lines to fit (which happens often since links to pages are frequently placed here) the Label's width is automatically extended beyond the size of the cell that contains it. I know this is the result of GWT resizing the Label by itself, but I'm not sure how to prevent this. I've tried setting the word-break to break-all, but this results in short words reaching the end of the line to be broken (like "this" into "th" and "is") which is just silly. Is there anyway I can force the GWT Label to only be 100% of the width of it's containing cell and not let it extend beyond that while still keeping this setting dynamic? Thank you much!
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home