PDA

View Full Version : BorderLayout default panels



SteveEisner
12 Nov 2006, 11:58 PM
Just another suggestion for abbreviated syntax.
How about being able to add panels during layout definition:


center: {
titlebar: false,
autoScroll: true,
tabPosition: 'top',
closeOnTab: true,
alwaysShowTabs: false,
add: [panel1, panel2, panel3] // Auto-add these panels
}


This would just auto-add those panel(s) inside a begin/end update, saving some common code. (Array isn't a common case but adding 1 panel to each region probably is.)

For that matter, one could just say:

center: {
...
add: new YAHOO.ext.ContentPanel('panel', {title: 'Title', fitToFrame:true})
}