View Full Version : Quicktips on menu items

20 Apr 2007, 9:27 AM
Hi Everyone,
Is there a way to add a quicktip to a menu item? After I declare the menu, I'm using the following code to add an item:
new Ext.menu.Item({
text: 'Menu Item 1'.
info: 'Information about Menu Item 1'

I'd like the qtip to display what is in the info attribute on a mouse over event.

The following works, but I'd like something a bit more graceful:
new Ext.menu.Item({
text: '<span ext:qtip=\'Information about Menu Item 1\'>Menu Item 1</span>'

Thanks for any help you can provide!

20 Apr 2007, 10:06 AM
here is what i've done - i took it from the examples.


var btnWestRegion = new Ext.Toolbar.Button({
id: 'tb_westRegion',
cls: 'x-btn-icon',
enableToggle: true,
toggleHandler: toggleRegion,
icon: 'img/toolbar/silk_icons/icons/application_side_expand.png',
tooltip: '<b>Toggle Left Region</b><br/>Press to toggle left region.'

20 Apr 2007, 10:59 AM
I got this part for the main buttons, sorry. I was trying to find a way to do it with the items in the dropdown menus.

21 May 2007, 7:40 AM
I have the same question. I have QTips on menus and buttons, but I can't get them to work on menu items...

21 May 2007, 7:46 AM
See http://www.extjs.com/forum/showthread.php?t=5372.

Does it help?

21 May 2007, 9:34 AM
I don't know how I didn't see that post before...
It works perfectly, copy&paste.

Ext.menu.BaseItem.prototype.onRender = function(container){
this.el = Ext.get(this.el);
if (this.tooltip) {
this.el.dom.qtip = this.tooltip;