PDA

View Full Version : how the scrollbar of panel move to the bottom when the content overflow



bill_chuang
5 May 2012, 6:59 AM
I want to show some text in the panel,and I set the panel autoScroll,when the contents are too many so that the panel overflows,and then the scrollbar shows,but the problem is that the scrollbar always stops at the top,like this
34924
so I want to ask how to set the position of scrollbar at the bottom when the content overflows.
Anybody can help me?
3ks

vadimv
6 May 2012, 12:40 AM
A few suggestions: either you play with the panel.body.dom.scrollconfigs, or you can try to use one of the methods provided by the same element:
Ext.get("id-of-element-to-be visible").scrollIntoView(panel.body.dom); , or panel.body.scroll()

bill_chuang
6 May 2012, 3:39 AM
3KS for your suggestion.
your suggestions is usefull.But when I use panel.body.scroll() method,the scroll effect is realized.But the firebug prints the error
"direction is undefined:

direction = direction.substr(0, 1);"
what the problem is?

vadimv
6 May 2012, 8:15 AM
you need to provide the required arguments to that method, check API doc.