PDA

View Full Version : Use browser's built-in tooltip?



wardrop
18 Jun 2013, 9:53 PM
Hi,

I noticed that when setting a tooltip on an element in ExtJS, it adds a "data-qtip" attribute to that element, instead of a "title" attribute. I'm wondering if I could make ExtJS add the tooltip in the "title" attribute of the element so the browser displays it in it's native look-and-feel?

Thanks

chamacs
19 Jun 2013, 1:16 PM
Use:



tooltipType : 'title'

wardrop
19 Jun 2013, 2:04 PM
Thanks. Is there anyway to set this at some global or wider level than for each component?

friend
20 Jun 2013, 11:29 AM
You can do an Ext.override(target, overrides) (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext-method-override) on the classes which implement the tooltipType property.

According to the docs, the following classes support the tooltipType property:


Ext.button.Button (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.button.Button-cfg-tooltipType)
Ext.menu.Item (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.menu.Item-cfg-tooltipType)
Ext.grid.Column (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.column.Column-cfg-tooltipType)
Ext.panel.Tool (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.panel.Tool-cfg-tooltipType)