View Full Version : Layouts and Scrolling

21 Nov 2011, 8:31 AM
So, one of the things I find MOST difficult about Ext is the combination of layout managers and their impact on scrolling, clipping, and expanding to fill a region.

It seems to me, that unless you use a 'fit' layout manager, Ext desperately wants to clip everything and anything. Which is very frustrating because this is very nearly never the desired behavior. The choice I desire is usually between scrolling or automatically expanding is the usual html way. I have almost never seen the property autoScroll have any effect on a container unless it was fit, which intuitively seems wrong.

This is doubly frustrating because layouts serve two roles, as far as i can see, to control scrolling behavior AND to control how sub-components are laid out. I want to use hboxes and vboxes and occasionally a few others like border or anchor. But It's very frustrating because once I use these, I can pretty much count on clipping issues in my future.

The layout browser is almost useless because the content it shows is never large enough to tell me how the component will scroll. I can snap a fit container around my vbox, but it doesn't matter because the vbox won't expand to the size of the content (it clips), so the container never scrolls. The reverse obviously won't work.

This is one of the most difficult and frustrating parts of Ext. Is there a tutorial on a technique somewhere that makes this easy? Is there a way to make my containers never clip? Some property I am overlooking maybe?

21 Nov 2011, 9:10 AM
Please provide a test case that we can advise you on. Yes, vbox and hbox do not support auto sizing.

21 Nov 2011, 10:44 AM

I feel your pain and know exactly what you're talking about. In my case, it's mostly Internet Explorer (the debbil!) which gives me these headaches. One of the biggest issues I have is trying to get a 100% height on child panels of an 'hbox' or 'column' layout. I've tried nesting 'vbox' child panels, border with 'center' region child panels, manipulating child panel heights on 'afterrender' event, etc.

On Chrome and Firefox, I can usually manage to get the desired effect; just not on the P.O.S. that is Internet Explorer...

P.S. My apologies for the lack of constructive comments, I just needed to vent... :]