PDA

View Full Version : Autoscroll, FitLayout, BoxMinWidth, BoxMinHeight => double scrollbars



amcsi
9 Nov 2010, 3:48 AM
I have a panel in a fit layout with minimum height and width set. Its owner has autoScroll on, and my problem is that when either the width or height of the panel goes below the minimum, vertical AND horizontal scrollbars appear even though when only the width or height is too low. How do I fix it so if only 1 scrollbar is needed, it only shows one?

Example code:
var viewport = new Ext.Viewport({
layout: 'fit',
autoScroll: true,
items: [
{
layout: 'fit',
boxMinWidth: 400,
boxMinHeight: 400,
items: [
{
html: 'Lol'
}
]
}
]
});

amcsi
18 Nov 2010, 7:36 AM
Bump

also, I don't know what I screwed up, but I somehow managed to fix this by changing the layout value of the container with autoScroll to 'anchor', and adding anchor:'100% 100%' to its child, having the child anchor to the container minus the scrollbar, but for some reason, it's the same problem again: it includes the scrollbar into the height/width calculations. So what can I do to fix this with either FitLayout or AnchorLayout?