Results 1 to 3 of 3

Thread: Tooltip on header of Ext.grid.CheckboxSelectionModel column

  1. #1
    Sencha Premium Member seek's Avatar
    Join Date
    Sep 2008
    Location
    North Italy
    Posts
    114
    Vote Rating
    1
      0  

    Question Tooltip on header of Ext.grid.CheckboxSelectionModel column

    Hello,
    I'm trying to place a tooltip on a CheckboxSelectionModel, but I'm surely missing something important....
    Any help whuold be appreciated:
    PHP Code:
    Ext.grid.AbstractSelectionModel.override({
      
    constructor: function(){
        
    Ext.grid.AbstractSelectionModel.superclass.constructor.call(this);
        if(
    this.tooltip){
           
    this.setTooltip(this.tooltiptrue);
        };
      },
      
    setTooltip: function(tooltipinitial){
         if(
    this.rendered){
          if(!
    initial){
            
    this.clearTip();
          };
          if(
    Ext.isObject(tooltip)){
            
    Ext.QuickTips.register(Ext.apply({
              
    targetthis.btnEl.id
            
    }, tooltip));
            
    this.tooltip tooltip;
          }else{
            
    this.el.dom['qtip'] = tooltip;
          };
        }else{
          
    this.tooltip tooltip;
        };
        return 
    this;
      },
      
    clearTip: function(){
        if(
    Ext.isObject(this.tooltip)){
          
    Ext.QuickTips.unregister(this.btnEl);
        };
      },
      
    destroy: function(){
        if(
    this.rendered){
          
    this.clearTip();
        };
        
    Ext.grid.AbstractSelectionModel.superclass.destroy.call(this);
      }
    }); 
    Seek

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    You need to set the 'ext:qtip' attribute of the element to a string and if you have QuickTips init'd then it should automatically pick up that and show a tooltip.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member seek's Avatar
    Join Date
    Sep 2008
    Location
    North Italy
    Posts
    114
    Vote Rating
    1
      0  

    Default

    Thanks!!!
    PHP Code:
    Ext.grid.AbstractSelectionModel.override({
      
    constructor: function(){
        
    Ext.grid.AbstractSelectionModel.superclass.constructor.call(this);
        if(
    this.tooltip){
          
    this.header='<div ext:qtip='+this.tooltip+this.header+'</div>';
        };
      }
    }); 

Tags for this Thread

Posting Permissions

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