1. #11
    Sencha User
    Join Date
    Feb 2010
    Posts
    12
    Vote Rating
    0
    proesterchen is on a distinguished road

      0  

    Default


    Good Idea, I'll give it a try....

  2. #12
    Sencha User
    Join Date
    Feb 2010
    Posts
    12
    Vote Rating
    0
    proesterchen is on a distinguished road

      0  

    Default


    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]
            }),

  3. #13
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,502
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    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.

  4. #14
    Sencha User
    Join Date
    Feb 2010
    Posts
    12
    Vote Rating
    0
    proesterchen is on a distinguished road

      0  

    Default


    I started listening to the beforeshow event and it did almost the work. I coppied some code from your QuickTip, this is my listener:

    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);
                        }
                    }
                }
    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.

    How do I stop the show-Event?

  5. #15
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,502
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    You'll have to debug.

Similar Threads

  1. Using 'anchor', 'anchorOffset', and 'anchorToTarget' on Treenode qtipCfg
    By wilzan in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 1 Sep 2009, 8:38 AM
  2. Help with TreePanel qtipCfg
    By donnki in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 31 Aug 2009, 1:24 AM
  3. How to specify a qtipCfg in json for treenode
    By mabra in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 13 Jul 2009, 11:28 AM
  4. TreeNode and qtipCfg
    By leoncx in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 25 Mar 2009, 12:29 AM
  5. AsyncTreeNode qtipCfg from JSON
    By crxtech in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 25 Mar 2009, 12:28 AM

Thread Participants: 1

Tags for this Thread