-
17 Jun 2010 6:12 AM #11
-
18 Jun 2010 7:01 AM #12
I worked a while on the plugin and made it do the work. But still som issues on it:
- I want to display the {tipTitle} as the title, not in the Template
- the Tip is displayed on TreeNodes, how can I find out if it's leaf (only display the Tip on leaves)
- is it possible to set some kind of maxHeight in combination with autoHeight: true
Here's my code so far:
Code:plugins: new Ext.ux.DataTip({ tpl: '<div><b>{tipTitle}</b></div><div>{tipText}</div>', width: 500, height: 300, autoScroll: true, autoHeight: false, autoHide: false, closable: true, mouseOffset: [-5, -55] }),
-
18 Jun 2010 7:26 AM #13
You'll have to implement showTreeToolTip (or whatever it's called, I forget) to set the Title
And to not show if it's not on a leaf.
maxHeight? I don't know.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
21 Jun 2010 7:25 AM #14
I started listening to the beforeshow event and it did almost the work. I coppied some code from your QuickTip, this is my listener:
As the docs of tooltip say "Return false from an event handler to stop the show." I return false when I want to not show the QuickTip. But now I get a "this.anchorEl is undefined" error in Firebug.Code:listeners: { beforeshow: function(comp) { var e = Ext.fly(comp.triggerElement).findParent('div.x-tree-node-el', null, true), node = e ? comp.host.getNodeById(e.getAttribute('tree-node-id', 'ext')) : null; if(node.attributes.iconCls != "role") { // node isn't a leaf -> hide return false; } else { comp.setTitle(node.attributes.tipTitle); } } }
How do I stop the show-Event?
-
21 Jun 2010 8:01 AM #15
You'll have to debug.
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
Similar Threads
-
Using 'anchor', 'anchorOffset', and 'anchorToTarget' on Treenode qtipCfg
By wilzan in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 1 Sep 2009, 8:38 AM -
Help with TreePanel qtipCfg
By donnki in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 31 Aug 2009, 1:24 AM -
How to specify a qtipCfg in json for treenode
By mabra in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 13 Jul 2009, 11:28 AM -
TreeNode and qtipCfg
By leoncx in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 25 Mar 2009, 12:29 AM -
AsyncTreeNode qtipCfg from JSON
By crxtech in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 25 Mar 2009, 12:28 AM


Reply With Quote