1. #1
    Sencha User
    Join Date
    Sep 2010
    Posts
    83
    Vote Rating
    0
    same66 is on a distinguished road

      0  

    Default Smart tooltip

    Smart tooltip


    Hi,

    I use a tooltip for a panel and I have a problem.
    My panel is on the right of my page, and when I put my mouse hover the panel, the tooltip is display but a part of this tooltip is outdoor (out? sorry french).

    Is it possible to give a property to enable tooltip that he did not have the size to display to the right of the cursor, he starts to the left?

    Thank

  2. #2
    Sencha User
    Join Date
    Sep 2010
    Posts
    83
    Vote Rating
    0
    same66 is on a distinguished road

      0  

    Default


    Nobody can help me ?

  3. #3
    Sencha User laurentParis's Avatar
    Join Date
    Aug 2010
    Location
    paris
    Posts
    246
    Vote Rating
    2
    laurentParis is on a distinguished road

      0  

    Lightbulb


    PHP Code:
    var myTooltipPanel = new Ext.ToolTip({
      
    targetmyPanelElOrId,
      
    anchor'r-r?',
      
    trackMousetrue,
      
    title:' test title',
      
    html'test tooltip'
    }); 

    http://dev.sencha.com/deploy/dev/doc...lement-alignTo
    "?" is passed at the end of the position string, the element will attempt to align as specified, but the position will be adjusted to constrain to the viewport if necessary"

  4. #4
    Ext JS Premium Member prophet's Avatar
    Join Date
    Mar 2007
    Location
    Greenwich, CT
    Posts
    187
    Vote Rating
    0
    prophet is on a distinguished road

      0  

    Default


    You can try to use the anchor config property... Also try defining the tip's height/width.
    Brad Baumann

  5. #5
    Sencha - Services Team
    Join Date
    Mar 2007
    Location
    Foristell, MO
    Posts
    1,109
    Vote Rating
    3
    jratcliff is on a distinguished road

      0  

    Default


    There is a bug/typo with Ext.ToolTip's adjustPosition method so add this override and see if that fixes the issue for you.

    Code:
    Ext.ToolTip.override({
    
        adjustPosition : function(x, y){
            if(this.constrainPosition){
                var ay = this.targetXY[1], h = this.getSize().height;
                if(y <= ay && (y+h) >= ay){
                    y = ay-h-5;
                }
            }
            return {x : x, y: y};
        }
        
    });

Similar Threads

  1. Ext.each : with remove - not smart enough
    By DaveC426913 in forum Sencha Touch 1.x: Discussion
    Replies: 5
    Last Post: 30 Nov 2010, 10:36 AM
  2. Is smart rendering possible in grid???
    By jeff77 in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 10 Sep 2010, 12:03 AM
  3. TreePanel - Smart Checkboxes
    By NoahK17 in forum Community Discussion
    Replies: 16
    Last Post: 12 May 2010, 8:55 AM
  4. Smart Ext toolbar
    By tinnt in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 20 Nov 2008, 7:04 PM
  5. GridPanel - smart rendering
    By embolooloo in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 8 Oct 2007, 7:57 PM

Thread Participants: 3