PDA

View Full Version : Scroll position



same66
14 Jan 2011, 12:56 AM
Hi,

I have a text area (extjs) for a session log
http://img39.imageshack.us/i/slog.jpg/
And I refresh this textarea every 5sec.

I want my scroll bar will automatically position the bottom of my screen so the user can see the new messages without getting the scroll bar all the time.
How to do this please?

Thanks :)

ladybug_3777
12 Apr 2011, 6:55 AM
Also wondering if it's possible to scroll to the bottom of a textarea.

ladybug_3777
12 Apr 2011, 7:54 AM
OK I think I finally have this working correctly. Took me a bit to get to the right dom object and use the correct scroll method.

(My textarea's id is multi_urls)


Ext.getCmp('multi_urls').getEl().scroll('bottom', Ext.getCmp('multi_urls').getValue().length);

Seems to be working. Not sure if

Ext.getCmp('multi_urls').getValue().length

is the proper number to scroll down to, but that can be adjusted with more research if it's not correct