2016-10-21 7 views

答えて

0
Ext.create({ 
     xtype:'window', 
     title:'Your panel', 
     width:300, 
     height:200, 
     layout:{ 
      type:'hbox' 
     }, 
     items:[ 
      { 
       xtype:'image', 
       src:'https://i.vimeocdn.com/portrait/58832_300x300', 
       width:50, 
       height:50, 
       listeners:{ 
        el: { 
         click: function() { 
          var combo=Ext.getCmp('mycombo'); 
          combo.expand(); 
         } 
        } 
       } 
      }, 
      { 
      xtype:'combobox', 
      id:'mycombo', 
      store:['data1','data2'] 
      } 
     ] 
    }).show(); 

使用combo.expand()コンボを展開し、

+0

ここをクリックhttps://fiddle.sencha.com/#fiddle/1j2m –

+0

ジョージありがとうございます。このコードによれば、検索は既に存在しています。しかし、私は、画像をクリックした後で検索を開始したいだけでなく、検索は画像の下に表示されるはずです。 – Anusha

+0

あなたはフィドルを追加できますか? –

0

をクリックして追加したり、タップするEL素子上のリスナーが、これを試してみる: Ext.application({ 名: 'フィドル'、

launch : function() { 
    Ext.create({ 
     xtype:'window', 
     title:'Your panel', 
     width:300, 
     height:200, 
     layout:{ 
      type:'vbox' 
     }, 
     items:[ 
      { 
       xtype:'image', 
       src:'https://i.vimeocdn.com/portrait/58832_300x300', 
       width:50, 
       height:50, 
       listeners:{ 
        el: { 
         click: function() { 
          var combo=Ext.getCmp('mycombo'); 
          combo.show(); 
          combo.expand();         
         } 
        } 
       } 
      }, 
      { 
      xtype:'combobox', 
      id:'mycombo', 
      store:['data1','data2'], 
      hidden: true 
      } 
     ] 
    }).show(); 
} 

});

関連する問題