2016-05-12 4 views
0

Я добавил значок в поле Label. При наведении на иконку я покажу всплывающую подсказку. Но при подсказке всплывающая подсказка не скрыта/уничтожена.ExtJS/HTML - всплывающая подсказка не скрывается от мыши.

Является ли моя цель правильно? Я также пробовал target:a.target, и target:a.target.id

Here это скрипка.

Благодаря

ответ

1

попробовать, как этот вар показывает = Ext.create ('Ext.data.Store', { поля: [ 'ID', 'шоу'], данные: [ {ID: 0, показать: 'Battlestar Galactica'}, {id: 1, show: 'Doctor Who'}, {id: 2, show: 'Farscape'}, {id: 3, show: 'Firefly'}, {id: 4, показать: «Звездный путь»}, {id: 5, показать: «Звездные войны: Рождество специальное»} ] });

         Ext.create('Ext.form.Panel', { 
              renderTo: Ext.getBody(), 
              title: 'Sci-Fi Television', 
              height: 200, 
              width: 500, 
              items: [{ 
               xtype: 'tagfield', 
               fieldLabel: 'Select a Show'+'<img id="test"       src="https://cdn0.iconfinder.com/data/icons/glyphpack/85/info-alt-128.png" style="height:15px;width:15px;">', 
               store: shows, 
               listeners: { 
                afterrender: function(){ 
                 var a = Ext.getElementById("test"); 
                 var tip = Ext.create("Ext.tip.ToolTip", { 

                header:false, 
                autoScroll:true, 
                autoHide:true, 
                autoDestroy:true, 
                closeAction:"hide", 
                target:a, 
                html:[    
                '<div class="hopscotch-bubble-container" padding: 5px;">',   
                '<div class="hopscotch-content">', 
                 '<h3 class="hopscotch-title"><b>Instructions</b></h3>', 
                 '<div class="hopscotch-content">field instructions here</div>', 
                '</div>',      
                '</div>', 
                '<div class="hopscotch-bubble-arrow-container left">', 
                '<div class="hopscotch-bubble-arrow-border"></div>', 
                '<div class="hopscotch-bubble-arrow"></div>', 
                '</div>' 
                ],   
                width:"auto", 
                height:"auto"   
               }); 

               tip.showAt(a.target.x,a.target.y); 

                } 
               }, 
               displayField: 'show', 
               valueField: 'id', 
               queryMode: 'local', 
               filterPickList: true 
              }] 
             }); 
Смежные вопросы