PDA

View Full Version : Tooltip title text on tabs


jarrod
11-09-2006, 01:16 AM
Just a suggestion, may be good to allow the tooltip text to be set to something different from the tab's text?

jack.slocum
11-09-2006, 04:44 AM
YAHOO.ext.TabPanelItem.prototype.setTooltip = function(text){
this.titleEl.dom.title = text;
};

Note, it you call setText you will have to reset the tooltip.

jarrod
11-10-2006, 02:06 AM
Btw, is there a quick method to retrieve the tabpanelitem of a contentpanel?

Meanwhile, noticed that maxTabWidth is not used? Perhaps if the tab text length can be truncated automatically by maxTabWidth (with ... ellipses?) then the tooltip can remain as the original long text string.

jack.slocum
11-10-2006, 06:13 AM
Perhaps if the tab text length can be truncated automatically by maxTabWidth (with ... ellipses?)

It is in browsers with support text-overflow (IE and Safari). Doing it with code is too resource intensive with more than 5 or 6 tabs (I tried).

jarrod
11-12-2006, 10:05 PM
Yeap, agreed - will let the browser do it if it supports it then.

Meanwhile, just to confirm... RC1 doesn't seem to use the maxTabWidth value?

jack.slocum
11-12-2006, 10:19 PM
Nope. It was added for tab scrolling which ended up not happening. I left it in there because it could be used in the future.