Re: Label with HTML
Have you tried the HTML widget? Label is for text (setInnerText) and HTML is for HTML (setInnerHTML)
-jason
On Dec 14, 2009, at 10:05 AM, Dennis Madsen wrote:
> Have I completely misunderstood something? There must be a way of
> doing so.
>
> On 13 Dec., 23:04, Dennis Madsen <den...@demaweb.dk> wrote:
>> I have this small code, where I add a Label (div) to another div in my
>> HTML:
>>
>> Label labelEntry = new Label("<strong>"+entry.getName()+":</strong>
>> "+entry.getMessage());
>> labelEntry.addStyleName("entry");
>> RootPanel.get("entries").add(labelEntry);
>>
>> The HTML-code is shown instead of the right HTML. How can I build a
>> div with this strong-tag inside?
>>
>> Another thing. I add a style like addStyleName("entry"). What if I
>> would like to set an ID of the div instead, as ID="entry"?
>>
>> Thank you!
>
> --
>
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home