1. #1
    Sencha Premium Member seek's Avatar
    Join Date
    Sep 2008
    Location
    Italy
    Posts
    112
    Vote Rating
    1
    seek is on a distinguished road

      0  

    Question Tooltip on header of Ext.grid.CheckboxSelectionModel column

    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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,647
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      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 @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member seek's Avatar
    Join Date
    Sep 2008
    Location
    Italy
    Posts
    112
    Vote Rating
    1
    seek is on a distinguished road

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

Thread Participants: 1

Tags for this Thread