Manual:Widgets:ToolTip (Legacy)

This version of our Learning Center is unmaintained.
This article may be out-of-date or contain incorrect information.
Please visit the new Sencha Learning Center for up-to-date material.

Go to the new Sencha Learning Center

From Sencha - Learn

Jump to: navigation, search

ToolTip

The ToolTip widget is an easy way to programmatically add a panel that magically appears and disappears when the mouse hovers over an element (aka. a tooltip).

Adding a tooltip to an existing dom element (with id 'my-elem') is as easy as:

var tt = new Ext.ToolTip({
    target: 'my-elem',
    title: 'Tooltip Title'
});

Or you can add some customizations (ToolTip is a subclass of Panel so we can apply all the usual Panel options, as well as some ToolTip-specific ones):

var tt = new Ext.ToolTip({
    target: 'my-elem',
    title: 'Tooltip Title',
    plain: true,
    showDelay: 0,
    hideDelay: 0,
    trackMouse: true
});
This page was last modified on 30 June 2008, at 23:04. This page has been accessed 22,453 times.