Re: How to add an icon to MenuItem?

2013-05-13 Thread Honza Rames
Hi, I came across the same problem, I had to create a subclass of MenuItem which sets MenuItem's setHTML and gives it a built up image + text HTML string. I used ClippedImageImpl to create the image HTML. On Monday, May 6, 2013 3:38:38 PM UTC+2, membersound wrote: Hi, how can I get add an

Re: How to add an icon to MenuItem?

2013-05-13 Thread Andrea Boscolo
You don't need to extend MenuItem. See http://stackoverflow.com/questions/16399241/how-to-add-an-icon-to-a-menuitem-in-gwt -- 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,

Re: How to add an icon to MenuItem?

2013-05-13 Thread Honza Rames
Yep, this is a nice way to do this as well but if you want to use UiBinder with ui:with ... / having the MenuItem subclassed is much more convenient because then I can set ImageResource directly from the ClientBundle. On Monday, May 13, 2013 1:15:28 PM UTC+2, Andrea Boscolo wrote: You don't

How to add an icon to MenuItem?

2013-05-06 Thread membersound
Hi, how can I get add an icon with text to a menu item in GWT? The following does not work: ui:with field='res' type='my.package.MyResources' / gwt:MenuBar g:MenuItem text=testg:Image resource={res.myIcon} //g:MenuItem Resulting error: Not allowed in an HTML context: g:Image