2012-03-23 169 views
2

我把搜索字段中的GridPanel工具欄是這樣的:100%的寬度

var searchGrid = Ext.create('Ext.grid.Panel', { 
    store: searchStore, 
    columns: [searchColumns], 
    hideHeaders: true, 
    tbar: [{ 
     xtype: 'searchfield', 
     store: searchStore 
    }], 
    listeners: { 
     itemclick: function(v,record) { 
      // do stuff 
     } 
    } 
}); 

enter image description here

我想我的搜索領域擴展的全寬格。我知道,只要網格大小發生變化,我就可以將偵聽器添加到網格中,以便調整搜索字段的大小,但是有人知道我錯過了一個配置或更乾淨的東西嗎?場上1中,由於工具欄使用HBox中佈局:

回答

4

指定彎曲。

+0

哇,我認爲這是我第一次嘗試。無論如何,它很好,謝謝。 – Geronimo 2012-03-24 00:21:39