Results 1 to 3 of 3

Thread: Grid cell tooltip

  1. #1
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    135
    Vote Rating
    1
      0  

    Default 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
      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 User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Redwood City
    Posts
    30,856
    Vote Rating
    88
      0  

    Default

    The solution? You "found" it?

    The thread below this one???????
    Longtime Sencha engineer. Now surplus to requirements apparently...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •