PDA

View Full Version : tooltip - [ff3.0.12]



fother
30 Jul 2009, 2:16 PM
in hosted mode win vista work fine but int ff 3.0.12 broken (look the attchament)



public interface Images extends ImageBundle {

@Resource("abc.png")
AbstractImagePrototype abc();
}




public static final Images IMAGES = GWT.create(Images.class);

public void onModuleLoad() {

String toolTip = "";

final String[] list = new String[] { "name1", "name2", "name3", "name4", "name5", "name6", "name7" };

for (final String str : list) {
toolTip += "<div style='clear: both'>";
toolTip += "<div style='padding: 1px 0px 1px 0px;'><div style='float: left; width: 20px;'> " + IMAGES.abc().getHTML()
+ "</div><div style='float: left;'>" + str + "</div></div>";
toolTip += "</div>";
}

final ToolTipConfig config = new ToolTipConfig(toolTip);
config.setAutoHide(false);
config.setShowDelay(1);

final ContentPanel panel = new ContentPanel();
panel.setSize(500, 500);
panel.getHeader().setToolTip(config);

RootPanel.get().add(panel);
}

fother
31 Jul 2009, 3:35 AM
any ideia?

fother
31 Jul 2009, 6:39 AM
after try, try, try and try the soluction...



public void onModuleLoad() {

final String[] list = new String[] { "name1", "name2", "name3", "name4", "name5", "name6", "name7" };

String toolTip = "<div>";
toolTip += "<ul>";
for (final String str : list) {
toolTip += "<li><div>" + IMAGES.abc().getHTML() + "<span style='padding: 0px 0px 0px 5px; top: -4px;position: relative;'>" + str
+ "</span></div></li>";
}
toolTip += "</ul>";
toolTip += "</div>";

final ToolTipConfig config = new ToolTipConfig(toolTip);
config.setAutoHide(false);
config.setShowDelay(1);

final ContentPanel panel = new ContentPanel();
panel.setSize(500, 500);
panel.getHeader().setToolTip(config);

RootPanel.get().add(panel);

}