1. #1
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    135
    Vote Rating
    1
    mmarti is on a distinguished road

      0  

    Default Grid cell tooltip

    Grid cell tooltip


    Hi all,

    Does anybody know, if it's possible to show the tooltip from the plugin CellToolTips above the mouse cursor?

    Thanks for any help.

    Best regards

    Mike

  2. #2
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    135
    Vote Rating
    1
    mmarti is on a distinguished road

      0  

    Default


    Found a solution:

    Ext.override(Ext.ToolTip,{

    adjustPosition : function(x, y){

    // do not position outside the Window
    var cw = document.documentElement.clientWidth-5;
    var ch = document.documentElement.clientHeight-5;
    var bw = this.body.getTextWidth();
    if(this.title) bw = Math.max(bw, this.header.child('span').getTextWidth(this.title));
    bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr");
    var bh = this.getInnerHeight() + this.getFrameHeight() + this.body.getPadding("tb");
    if(x + bw > cw) x = cw - bw;
    if(y + bh > ch) y = ch - bh;

    // do not position under mousecursor
    var ay = this.targetXY[1], h = this.getSize().height;
    if(this.constrainPosition && y <= ay && (y+h) >= ay){
    y = ay-h-5;
    }

    return {x : x, y: y};
    }
    });

    Regards

    Mike

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

      0  

    Default


    The solution? You "found" it?

    The thread below this one???????

Thread Participants: 1