PDA

View Full Version : how to have bbar and buttons coexist in same Panel?



kchiu
18 Sep 2009, 1:54 AM
Hi again,

Does anyone know how to have the buttons from the 'buttons' property appear before a statusbar (defined via the 'bbar' property) when they're placed in the same Panel?

This is what I've done:
http://128.250.148.12:8080/examples/textareaForm2.html

As you can see, the statusbar actually appears above the buttons, which is opposite to what I'd expect.

The code:


var viewPort = new Ext.Viewport({
layout:'border' // doesn't work
,bodyStyle: 'padding:10px 10px'
,items: [{
region: 'center'
,bodyStyle: 'padding:10px 10px' // doesn't work
,xtype: 'panel'
,layout: 'border'
,items:[
formCfg
,{
region: 'center'
,xtype: 'tabpanel'
,bodyStyle: 'padding:10px 10px' // works only for tab panel's inner TextArea
,plain: true
,activeTab: 0
,items: [
{xtype: 'textarea', title: 'Details 1'},
{xtype: 'textarea', title: 'Details 2'}
]
}]
,buttonAlign: 'left'
,buttons: [{text: 'Save'},{text: 'Clear'}]
,bbar: new Ext.ux.StatusBar({
defaultText: 'New Record: please fill in the details'
})
}]
});
Any ideas how to fix that?

Thanks a lot again, regards.

5 Oct 2009, 5:53 AM
I see what you're trying to do. You will need to wrap that panel in another panel, which has the bbar.