PDA

View Full Version : Stacking a combo and a treepanel in a Viewport



ewomack
28 Mar 2011, 1:19 PM
Hello,

Not sure why I can't get this to work, but I can't, so I thought I'd try here.

I'm simply trying to stack a combo box on top of a treepanel in the west region of a viewport. The viewport renders fine with the tree panel by itself. But when I try something like this:



{
region: 'west',
items: [
{
xtype: 'combo',
fieldLabel: 'Clients',
store: clientStore,
valueField: 'ID',
displayField: 'Name',
typeAhead: true,
mode: 'remote',
triggerAction: 'all'
},
{
xtype: 'treepanel',
title: 'Clients',
id: 'clientsTree',
loader: treeloader,
lines: true,
width: 220,
autoScroll: true,
root: rootnode
}
]
}


...the viewport won't render at all. I'll get either some remnants of the title bars or a completely blank screen. Do the treepanel and combo need to get put into a form or a panel and then inserted into the viewport? I've tried variations on that also with the same results. And isn't the default xtype for a viewport region a 'panel' anyway?

I feel like I'm missing something very simple, but I can't find it.

kohyea
28 Mar 2011, 1:41 PM
Why not put the combo to the tbar of the treepanel?