user2559651
user2559651

Reputation: 61

How do i add a tooltip to existing gwt Textbox?

my application is using eclipse with gwt plugin included. Currently it has a simple textbox without tool tip functionality.

Do i have to import a plugin of j query or java script file? If yes provide the procedure

or How can i make a customized text box using all this?

i tried using Qtip but did not succeed as i am quite new to javascript,css and html

Upvotes: 2

Views: 10736

Answers (2)

Olivier Tonglet
Olivier Tonglet

Reputation: 3492

For a nice tooltip (other than the HTML default) you can use a composite widget. You'll find examples with GWT-Bootstrap and plain GWT at this post.

Upvotes: 0

Michael Berry
Michael Berry

Reputation: 72254

You can do this easily in GWT - use the setTitle() method:

textBox.setTitle("Tooltip text");

This method is available on any UIObject - no point introducing external JS libraries when you don't have to. (You can mix them with GWT, but it gets quite complicated quite quickly!)

Upvotes: 7

Related Questions