2

我必须在文本字段的焦点事件上显示带有 xtemplate 的工具提示

我试过下面的代码,

           var tf = new Ext.form.TextField({
               name: 'name',
               fieldLabel: 'field label',
               width: 100,
               allowBlank: false,
               listeners        : {
                    focus : function(tb, e) {
                         Ext.QuickTips.register({
                           target: tf,
                           title: 'QT Title',
                           text: 'QT Text'
                         });
                     }
               }                                                                                                                           
           });

必须感谢任何帮助。

4

1 回答 1

1

除了 QuickTips init MK 建议看起来像一个简单的错字,函数参数列出“tb”而不是“tf”,你正在提供给“target”属性。

于 2014-03-06T19:55:15.913 回答