I did the usual search for an answer but didn't find any.
I want to scroll to the top of a Ext.form.TextArea.
How do I do this?
Ed
Printable View
I did the usual search for an answer but didn't find any.
I want to scroll to the top of a Ext.form.TextArea.
How do I do this?
Ed
Same was as you always scroll scrollable elements to the top in all the HTML pages you've ever written.
Set the scrollTop of the HtmlElement to 0
I tried your suggestion. No go. The scroll bar stays at the bottom.
I have several cards in a card layout.
I switch to the form with the TextArea, scroll to the bottom, then switch to another form
in the card layout, then switch back to the form with the TextArea.
Right before calling setActiveItem to switch to the form with the TextArea I call load on a Store, the Store Load event calls:
function CLP_AccountLettersStoreLoad(StoreObj, Records, Options)
{
if (Records.length == 0) return;
var FormObj = WindowObj.findById('AccountLettersForm');
FormObj.getForm().loadRecord(Records[0]);
CLP_AccountLettersScrollTop();
}
function CLP_AccountLettersScrollTop()
{
var FormObj = WindowObj.findById('AccountLettersForm');
var LetterObj = FormObj.findById('Letter');
LetterObj.getEl().scrollTop = 0;
FormObj.doLayout();
}
getEl.
What does it return?
Got it. Works.
Thanks,
Ed