Results 1 to 3 of 3

Thread: tbar with combobox and tooltip

  1. #1
    Sencha User
    Join Date
    Feb 2009
    Posts
    264

    Default tbar with combobox and tooltip

    Hello !

    I have a tbar.
    In this tbar exist a combobox.
    How can i set a tooltip for this combobox ?

    tbar: [{
    text: 'Bitte Hotel whlen: ',
    xtype: 'tbtext'
    },{
    xtype: 'combo',
    width: 150,
    triggerAction: 'all',
    displayField: 'property_name',
    valueField: 'property_code',
    store: hotelStore,
    lazyRender:true,
    hiddenName: 'property_code',
    id: 'myHotel',
    tooltip: 'Test'
    }, ...
    Who has an idea ?

    Your sincerly

    Stephan

  2. #2
    Sencha User Mycoding's Avatar
    Join Date
    May 2010
    Location
    Russia, Volgograd
    Posts
    460

    Default

    http://stackoverflow.com/questions/1...-not-displayed
    Code:
    Ext.QuickTips.init();
    new Ext.form.ComboBox({
    	renderTo:Ext.getBody(),
    	tpl:'<tpl for="."><div ext:qtip="{abbr}" class="x-combo-list-item">{state}</div></tpl>',
    	store: sstore,
    	displayField:'state',
    	typeAhead: true,
    	mode: 'local',
    	triggerAction: 'all',
    	emptyText:'Select a state...',
    	selectOnFocus:true,
    	forceSelection: true,
    	width:135
    });
    
    
    var statedata = [
      ['AL', 'Alabama'],
      ['AK', 'Alaska'],
      ['AZ', 'Arizona'],
      ['WV', 'West Virginia'],
      ['WI', 'Wisconsin'],
      ['WY', 'Wyoming']
    ];
    
    
    var sstore = new Ext.data.SimpleStore({
      fields: ['abbr', 'state'],
      data : statedata 
    });

  3. #3
    Sencha User
    Join Date
    Feb 2009
    Posts
    264

    Default tooltip combobox

    Hello !

    Thanks for the answer.
    I look for a solution like this.

    Code:
    Ext.onReady(function(){
        Ext.intercept(Ext.form.Field.prototype, 'initComponent', function(){
            var fl = this.fieldLabel, h = this.helpText;        if(h && h !== '' && fl){
                this.fieldLabel = fl + '<span style="color: green;" ext:qtip="' + h + '"> <img src="/buttons/information.png"> </span>';
            }
        });
    });
    I would like to have an icon next to the item.

    Your sincerly

    Stephan
    Attached Images Attached Images

Posting Permissions

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