PDA

View Full Version : onScroll event for TreePanel



mjaomaha
18 Oct 2010, 7:02 AM
If I have a tree panel that has enough nodes that a scroll bar appears, I would like to call a function if the scroll bar is clicked on or is being dragged up or down. (Either will work, so I just need to see which is easier). Does anyone know if there is an event built in for this? I did not see one in the API.

Thanks.

Animal
18 Oct 2010, 7:05 AM
As for all Panels:



myPanel.body.on({
scroll: handlerFunction
});


Remember that the body only exists when the Panel has been rendered.

mjaomaha
18 Oct 2010, 10:12 AM
Thanks. I happened to be working with the new TreeGrid, so in my afterRender function, I have:


this.innerBody.on({
scroll: this.removeLocaterArrow
});


The onScroll mouse event only exists in Html 5. Do you know how they accomplished this event?