I need to put an HorizontalPanel as caption because I'd like to use a
customizable by CSS image for the icon. I use the background-image
property, but I cannot use the Image widget without using a
transparent image as source. As I use the Label widget, I cannot use
the setIcon method.
As a provisional solution, I use the setCaptionText method, using
toString() method to obtain the HTML code. It works, but I cannot put
the icon on the left side of the caption as it would be if I used the
setIcon method.
Thank you very much.
Alberto
Out of curiosity, why do you need a CSS background image? For dynamic
theme changes?
AlertDialog wasn't really designed with customization in mind.
setCaption() is not supported and should probably throw an
UnsupportedOperationException. buildCaption() is protected, so you can
subclass and override it to return a custom caption.
I've logged a RFE for a customizable dialog with some of AlertDialog's
features:
http://code.google.com/p/gwt-tk/issues/detail?id=6
Best regards,
-= Mat