简体   繁体   中英

extjs 3.4 add tool tip in from field

Hi I have some form fields and I'm trying to add tool tip. But it is not working. This is my fields,

var importForm = new Ext.form.FormPanel({
             //html: "<p>Imgae source: <b>img</b> folder in root directory</p>",
            url: '/plugin/ImageImport/admin/import',
            monitorValid: true,
            labelWidth: 175,
            frame: true,
            title: 'Image Import',
            width: 250,
            defaultType: 'textfield',
            defaults: { allowBlank: false },
            items:[
              { fieldLabel: 'Source Folder Path', name: 'imgSourcePath', id:'imgSourcePath' },
              {
                  xtype: 'combo',
                  name: 'folderId',
                  fieldLabel: 'Target Folder',
                  mode: 'local',
                  store: valuesDir,
                  displayField:'key',
                  valueField: 'id',
                  width: 'auto',
                  triggerAction: 'all',
                  emptyText:'Select Folder...',
                  id:'folderId',
                  selectOnFocus:true,
                  allowBlank: false,
                  editable: false,
                },

              {
                  xtype: 'combo',
                  name: 'transformation',
                  fieldLabel: 'Image Transformations',
                  mode: 'local',
                  store: values,
                  displayField:'name',
                  valueField: 'name',
                  width: 'auto',
                  triggerAction: 'all',
                  emptyText:'Select Transformation...',
                  id:'transformation',
                  selectOnFocus:true,
                  allowBlank: false,
                  editable: false,

                },


                   ],

And at the end of my code I'm trying to add tool tip,

Ext.onReady(function(){
    new Ext.ToolTip({
    target: 'imgSourcePath',
    html: 'A very simple tooltip'
        });

 new Ext.ToolTip({
    target: 'folderId',
    html: 'A very simple tooltip'
        });

 new Ext.ToolTip({
    target: 'transformation',
    html: 'A very simple tooltip'
        });

 Ext.QuickTips.init();
});

I tried qtip as well but that also not working.like,

 { fieldLabel: 'Source Folder Path', name: 'imgSourcePath', id:'imgSourcePath', qtip: 'This is tool tip' },

Please help me someone ...

Take a look on this issue to know how to put it on comboBox ExtJs 3.4 : Set tool tip for combo box

Hope this help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM