Reputation: 33297
GWT does provide tooltip with something like:
Label label = new Label("test");
label.setTitle("This is a tooltip");
Is there a way to style such tooltips? Is there a library for GWT that supports this?
Edit: How do I set the time for the tooltip to appear?
Upvotes: 1
Views: 5730
Reputation: 10294
The real answer to your question is : No
, native tooltip style can't be modified.
Alternatives are creating your own tooltips:
Note that if you keep using the title
attribute the native tooltip will be shown over your custom tooltip.
Upvotes: 1
Reputation: 743
You can use GWTQuery for doing tooltip, there are a Plugin for that. GwtQuery is a clone of JQuery but build in java.
You can find the demo here :
http://arcbees.github.io/ArcBees-GQuery-Plugins/
With this sample code, you can create toolkit for all title in the page :
$("[title]", toolbar).as(Tooltip).tooltip();
And the source code is here : https://github.com/ArcBees/ArcBees-GQuery-Plugins/tree/master/tooltip
Upvotes: 3
Reputation: 41089
Tooltips can be styled with CSS. You can use one of the online tools:
http://www.menucool.com/tooltip/css-tooltip
Upvotes: 0
Reputation: 1751
You can use CSS
First, you add the style you want in your css
Then you set that style to the element you want with label.setStyleName("myStyle");
Upvotes: 0