- 我的面板 - border布局如下所示:- var oSplitPanel = Ext.create('Ext.panel.Panel', { lid : 'splitpanel', layout: 'border', border: 0, style: { border: 0 } height: 150, items: [{ split: true, flex: 1, region: 'west', xtype: 'panel', lid: 'panelwest', layout: 'fit', minWidth: 200 }] });
- 然后另一个面板被添加到这个 - west区域面板:- oSplitPanel.query('[lid=panelwest]')[0].add(oExplorerPanel);
- 然后这个拆分面板被添加到我的主视图中: - that.getView().add(oSplitPanel);
- 然后在另一个函数中,我添加了 - center面板:- var oAddPanelRight = { split: true, flex: 3, region: 'center', xtype: 'panel', lid: 'panelcenter', layout: 'fit', border: 0 }; oSplitPanel.add(oAddPanelRight);
问题:
一切都以这种方式完美运行,但是我想更改(限制)拆分器自身的宽度(此拆分器位于面板之间west以center调整其宽度)。
我尝试了什么:
- 尝试更改拆分器的宽度: - listeners: { afterrender: function() { // error following, 'splitters' does not exist oSplitPanel.layout.splitters.west.setWidth(1); oSplitPanel.doLayout(); } }
- 向 - center面板添加负边距:- // Tried this: margin: '0 0 0 -4' // And that: style: { border: 0, marginLeft: '-3px' }