0

TabPanelのタブ幅とタブ高さを設定するにはどうすればよいですか?

私は試した:

var myTabPanel  = Ext.create('Ext.TabPanel', {  
   fullscreen: true,
   tabBarPosition: 'top', 
   resizeTabs: true,
   tabWidth: 300, 
   //minTabWidth: 300
        ....

しかし、それは機能しません

4

2 に答える 2

0

css煎茶ファイルの中で起こっているのはそれだけです。そこで変更する必要があります。

于 2012-08-11T08:44:47.027 に答える
0

良いニュース、

私はこれをプログラムで行う方法を見つけました。

//assuming you are using the MVC structure as suggested
/*In the controller class of your view with the tab panel you must have reference to the tab panel in refs config.
The reference name for this case will be: myTabpanel
*/

//somewhere in the controller class
var tabPanelItems = this.getMyTabpanel().getItems; //get all the items inside the tab panel (if i'm not mistaken this will also return some "extra" item which is not panel
for (var i = 0; i < panels.length; i++) {
  //due to that extra item i mentioned, need to make sure current item is a tab by confirming "tab" property existence
  if (panels.items[i].tab) {
    panels.items[i].setWidth('100px');
    panels.items[i].setHeight('25px');
  }
}

そしてそれだけです。重要な点は、タブパネル(パネル付きタブ)であるため、最初にタブパーツのみを構成するには、最初にタブパーツを取得する必要があります。それ以外の場合は、デフォルトでパネルパーツのみを構成します。

于 2013-12-17T05:14:26.393 に答える