PDA

View Full Version : Split Bars not Working in ExtJs 3.1.1



fulfowi
6 Apr 2010, 12:34 PM
I'm in the process of porting an application from ExtJs 2.0.1 to ExtJs 3.1.1. In 2.0.1 my Split Bars work correctly, but they don't in 3.1.1 - They display, but they don't move when I click and drag. Here are excerpts from my code:



...
UI.tb = new Ext.Toolbar
({
cls: 'adl-tb-push-btn'
});
...
var grid = new Ext.grid.EditorGridPanel
({
title: 'Plugins',
cls: 'classification-header',
id: 'pluginGrid',
ds: pluginStore,
cm: UI.cm,
region: 'north',
autoHeight: false,
height: 400,
margins: '32 0 3 0',
split: true,
loadMask: true,
viewConfig: {forceFit: true}
});
...
UI.staTb = new Ext.Toolbar
({
cls: 'adl-tb-push-btn',
columnWidth: 1.0
});
UI.pinPanel = new Ext.FormPanel
({
layout: 'column',
frame: true,
autoScroll: true,
labelAlign: 'right',
margins: '3 0 3 0',
region: 'center',
split: true,
tbar: UI.staTb,
items: [fieldSet1, fieldSet2]
});
...
UI.envPanel = new Ext.FormPanel
({
frame: true,
autoScroll: true,
width: 375,
title: 'Plugin Environment',
labelAlign: 'right',
margins: '3 0 3 0',
region: 'west',
split: true,
items: [dummyField]
});
...
UI.logsTb = new Ext.Toolbar
({
cls: 'adl-tb-push-btn'
});
...
UI.treePanel = new Ext.tree.TreePanel
({
title: "ADL Run Logs",
frame: true,
width: 375,
split: true,
animate: true,
loader: UI.loader,
enableDD: true,
dropConfig: {appendOnly: true},
margins: '3 0 3 0',
region: 'east',
autoScroll: true,
tbar: UI.logsTb
});
...
UI.monitorPanel = new Ext.Panel
({
title: 'ADL Monitor',
collapsible: 'true',
hideBorders: 'true',
height: 100,
region: 'south',
split: true
});
...
UI.viewport = new Ext.Viewport
({
layout: 'border',
items:
[UI.tb, UI.grid,
UI.pinPanel, UI.envPanel, UI.treePanel,
UI.monitorPanel]
})



Any ideas?

zachext
6 Apr 2010, 6:43 PM
Hi Doug,

It seems like UI.tb should be in the tbar or bbar config of a panel rather than an item in the viewport's collection. UI.tb doesn't have a region, so the border layout may not be able to render it properly. If you just remove UI.tb from the viewport items, do your split bars work?

Animal
6 Apr 2010, 11:28 PM
I don't understand how you can put 6 items in a border layout and expect some valid result.

fulfowi
7 Apr 2010, 8:15 AM
zachext,

I moved the UT.tb as a tbar to the UI.grid. This didn't change anything. I noticed that when I try to drag the split icon, either the text field labels and combo box arrows are highlighted or an icon of the entire window is dragged. It's acting as if the event is something other than a splitbar drag. I'm using Firefox 3.0.12 on Redhat Linux, if that helps.

Animal,

I want a window with a toolbar on top, a panel below that, three panels below that (west, center, east), and a panel below those three panels. What would you suggest? What I did worked in 2.0.1, and looks right in 3.1.1. Evidently this is not ideal.

rkdeiss
9 Apr 2010, 9:10 AM
It turns out that I was creating the viewport more than once. 2.0.1 was forgiving about this, but 3.1.1 wasn't. Ports always make for better code.

fulfowi
9 Apr 2010, 9:18 AM
I replied as my alter ego. The message above should have been from me.