Tab the method setIcon() and setCanClose()

code :
Tab gridTab = new Tab(title);
gridTab.setIcon(“image/gif/icon_history.gif”);

when I set the icon to gridTab ,they can show the Icon.
but I add code
setCanClose(true);

they can’t show the Icon.

any ideas?

thanks!

Hello,

Are you tried with setCloseIcon(java.lang.String closeIcon) ?

Regards.
Francisco.

This is a known issue. Simply set the tab icon as part of the tab title as follows. This is what the showcase does.

gridTab.setCanClose(true);
String icon = ""image/gif/icon_history.gif";
String imgHTML = Canvas.imgHTML(icon);
gridTab.setTitle("<span>" + imgHTML + " " + sampleName + "</span>");

Sanjiv

sorry,I was wrong.