PDA

View Full Version : Button Tooltip: tooltipType 'title'



abcdef
1 Sep 2011, 4:31 PM
How do I use a tooltip of type 'title' on a button. When I set it to be of type 'title', it does not show the tooltip on hover.

skirtle
3 Sep 2011, 10:17 AM
Try this:


new Ext.button.Button({
renderTo: Ext.getBody(),
text: 'Click',
tooltip: 'Tooltip',
tooltipType: 'title'
});

abcdef
12 Sep 2011, 10:48 PM
Try this:


new Ext.button.Button({
renderTo: Ext.getBody(),
text: 'Click',
tooltip: 'Tooltip',
tooltipType: 'title'
});

I tried the following in one of my panels:



{
xtype: 'button',
text: 'Click',
tooltip: 'Tooltip',
tooltipType: 'title'
}


I hover over it, and that doesn't do anything. What is it supposed to do?

Joyfulbob
29 Oct 2011, 7:42 AM
API doc is incomplete. You code it but it does nothing. Where is the title defined/used? This is a new feature in V4 and it should be documented.

I've tried this to no avail:


tooltip: ['Item Comments','This is the item comments tab'],
tooltipType: 'title',

skirtle
29 Oct 2011, 8:38 AM
title tooltips just set the title attribute on the element. After that it is outside of ExtJS's control, the tooltip is shown automatically by the browser. Some people have had issues with tooltips on disabled buttons because FF won't show a title on a disabled button.

I don't understand why you are trying to pass an array of strings as the tooltip.

Joyfulbob
29 Oct 2011, 12:31 PM
I see the difference now; without 'title' the background is blue; with it it is silver and a bit larger.