レイアウトのある私のパネルは
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' }