-
10 Jan 2012 11:24 PM #1
collapsed:true, possible bug.
collapsed:true, possible bug.
Hi,
The problem is very easy to reproduce. Just try to add a region to an existing Viewport like this:
The whole Viewport becomes a mess. just by setting collapsed to true. IF collapsed is false, everything works great.Code:Ext.getCmp('ViewPort').add( { region: 'south', id:'viewport-south', collapsible:true, collapsed:true, split: true, height: '20%', minHeight: 50, title: 'x', html: 'South Central' } );Using Ext with cachefly
Working on LAMPExt
-
10 Jan 2012 11:39 PM #2
From the docs:
The regions of a BorderLayout are fixed at render time and thereafter, its child Components may not be removed or addedEvan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
11 Jan 2012 6:20 AM #3
I thought they were made dynamic in 4.1. Don presented this info at senchacon. See the border layout section of the linked slide set...
www.slideshare.net/senchainc/ext-js-41-layouts-performance-and-api-updates
-
11 Jan 2012 8:05 AM #4
Agreed. Adding regions like this is listed in the 'Other Goodies' section of the blog post discussing what to expect from 4.1:
http://www.sencha.com/blog/whats-new-in-ext-js-4-1/
-
15 Jan 2012 10:12 AM #5
Exactly. I also read that adding components dynamically to Border Layout was one of the hottest features of 4.1.
The point is that adding components (regions) actually works. Yes, I can add components dynamically. The only problem is that setting "collapsed:true" gives a rendering problem.Border Layout
In the process of working on layouts, border layout in particular benefited from some internal restructuring. It has always been a very popular layout, but it has also suffered from some long-standing limitations:
You could only have one region that is north, south, east or west. If you needed multiple south regions, you needed to use nested border layouts.
You could not configure the layout such that an east or west region had priority over a north or south region. To achieve this, again, you needed to use nested border layouts.
Components could not be added to the container after creation.
Components could not be removed from the container after creation.
Fixing that issue, everything will work as expected.
I hope some of you guys give me a more detailed explanation.
Thanks.Using Ext with cachefly
Working on LAMPExt


Reply With Quote
