Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Extjs 4.1工具提示和DragNDrop_Extjs_Tooltip - Fatal编程技术网

Extjs 4.1工具提示和DragNDrop

Extjs 4.1工具提示和DragNDrop,extjs,tooltip,Extjs,Tooltip,我有以下问题。我创建了一组图像(小部件的预览图像)。这些图像应该被用来将它们拖放到所需的地方,小部件应该在那里,我还想在这些上面显示一个工具提示。这是我的代码: var img = Ext.create('Ext.Img', { xtype: 'image', x: 1210, y: 110, height: 100, margin: 5, width:

我有以下问题。我创建了一组图像(小部件的预览图像)。这些图像应该被用来将它们拖放到所需的地方,小部件应该在那里,我还想在这些上面显示一个工具提示。这是我的代码:

var img = Ext.create('Ext.Img', {
            xtype: 'image',
            x: 1210,
            y: 110,
            height: 100,
            margin: 5,
            width: 100,
            js_clsName: z.js_classname,
            src: '/js/resources/images/widgetPreview/' + z.ident + '.png',
            listeners: {
                afterrender: {
                    fn: createDD,
                    scope: this
                }
            }
        });
        img.tip = Ext.create('Ext.tip.ToolTip', {
            target: img.el,
            trackMouse: true,
            renderTo: Ext.getBody(),
            listeners: {
                beforeshow: function (tip) {
                    console.log(tip);
                    tip.update('asdasd');
                    return true;
                }
            }
        });

但是工具提示永远不会显示,但是拖放就像一个符咒。你能帮我吗?

已经知道了,问题是img.el没有定义,所以我必须稍后添加提示