嗨,我有一些表单字段,我正在尝试添加工具提示。但这是行不通的。这是我的领域

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,

                },


                   ],


在代码结尾处,我试图添加工具提示,

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


我也尝试过qtip,但也无法正常工作。

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


请帮助我某人...

最佳答案

看一下这个问题,知道如何将其放在comboBox ExtJs 3.4 : Set tool tip for combo box

希望对您有所帮助。

08-17 08:49