On Sunday, March 30, 2014 12:16:16 AM UTC+11, Tom wrote:
I have an HTMLPanel inside a FlowPanel which is inside a ScrollPanel like this.
<g:ScrollPanel> <g:FlowPanel> <g:HTMLPanel ui:field="
showMessageHTMLPanel" width="600px"/> </g:FlowPanel> </g:ScrollPanel>
showMessageHTMLPanelis used to hold the text that user enter a
I want that the
showMessageHTMLPanelshould show exactly like how it was displayed in
Ex,if user types in many sentences in new lines in
TextArea, then the
showMessageHTMLPanelshould show similar like this:This is text1 This is text2.
So here is what I did. I uses
HTML showMessageHTML = new HTML(new SafeHtmlBuilder().
appendEscapedLines(message). toSafeHtml()); getView(). getShowMessageHTMLPanel().add( showMessageHTML);
The result is that It breaks the lines quite OK, no problem.
However, When I type a non-stop very long string ( a String that doesn't have any space on it) into a TextArea. Ex, see this non-stop string:
Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaa."
As you saw, even this non-stop string has no space, but when typing in
TextAreathen the string will automatically fall into new lines.
Ok, now when I show that non-stop string in
getView()., it showed the text as one straight line without any line break:
The user has to scroll the scrollbar to see the complete text. This is unacceptable since it is too hard to see the whole line. Also many urls are non-stop string without spaces. So the user may not be able to copy the url.
How to make a very long non-stop string (without any space in it) break into many new lines when showing in HTMLPanel?
Do you know any other widget that can handle this?
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 email@example.com.
To post to this group, send email to firstname.lastname@example.org.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.