PDA

View Full Version : Understanding scrollbars



blex2010
22 Nov 2010, 7:41 AM
I have looked through the forum for an answer to this and have seen similar posts but not the answer...

I keep having panels where at some point the content is larger than the area so the vertical scroll bar appears. This is fine. However, when the vertical scrollbar appears it decreases the view area by some amount of pixels and the result is the horizontal scroll bar appears. This is not fine.

Can someone tell me what I'm doing wrong? More importantly, how can I avoid this?

Thanks!

Condor
22 Nov 2010, 8:13 AM
Ext can't automatically detect if a vertical scrollbar will appear, so the only solution is to reserve room for the vertical scrollbar (e.g. by using a scrollOffset or a negative anchor in a layout).

blex2010
22 Nov 2010, 8:51 AM
Is there an example of this? I'm just not sure what value to set.

So if I have p = new Panel({autoScroll:true) and l add HTML to it's body. What value should I set so the horizontal scroll won't show as the content begins to scroll vertically?

mado489
15 Nov 2012, 1:37 AM
Ext can't automatically detect if a vertical scrollbar will appear, so the only solution is to reserve room for the vertical scrollbar (e.g. by using a scrollOffset or a negative anchor in a layout).

Has anybody found some solution (or hack) to this problem? Please...

Thanks!