Answered: Auto scrolling to end of read only textarea
Answered: Auto scrolling to end of read only textarea
Hi,
I am trying to auto scroll a read only textarea however none of the solutions I have found online are working for me. I am an Ext JS beginner.
Using 'http://dev.sencha.com/deploy/ext-4.0.0/examples/form/absform.html' as an example I have built a similar window. The last item in panel is as follows:
var textOutput = this.mPanel.getComponent('output').getValue();
this.mPanel.getComponent('output').setValue(textOutput + 'some other value\n');
After this I have tried multiple different method to get the textarea to scroll to the bottom e.g.
(1) this.mPanel.getComponent('output').getEl().dom.scrollTop = 99999;
(2) this.mPanel.getComponent('output').selectText(textOutput.length);
(3) this.mPanel.getEl().scroll('b', Infinity);
(4) this.mPanel.getComponent('output').getEl().scrollBy(100,100, true);
...
It may be that one of the options I have tried were almost (but not quite right!). Help would be greatly appreciated.