PDA

View Full Version : Problem with "viewport.setOverflowXY('hidden', 'scroll');"



Elfayer
23 Aug 2012, 12:57 AM
Hi,

I would like to have a scrollbar on Y while the size of the viewport (ie. the web window) is under 500 px.

So I tried this:



'#Viewport': {
resize: function (vp) {
vpSize = vp.getSize();

if (vpSize.height < 500) {
vpSize.height = 500;
vp.setSize(vpSize.width, vpSize.height);
vp.setOverflowXY('hidden', 'scroll');
}
else
vp.setOverflowXY('hidden', 'hidden');
}


But that's not working, the scrollbar is in the viewport and there are many component in front. So I can't see it.

dawesi
23 Aug 2012, 1:21 AM
are you trying to make the minimum height 500 (ie: minHeight: 500) or are you trying to scroll when your container is under 500px?

Your question and your code say two different things.

Elfayer
23 Aug 2012, 1:30 AM
hm.. yep. I have minimize the height, but the user can always continue to reduce the web window. If the web window is 300 height for example, the app will stop reducing at 500, and in that case I would like to have a scrollbar :

38196

Elfayer
23 Aug 2012, 11:24 PM
up