PDA

View Full Version : Panels that scroll automatically



25 Aug 2012, 7:44 AM
I have a Tree and a Grid within a Form Panel. When the browser window is not big enough to show everything within the Form, scrollbars appear automatically - which is fine and desired. What I want to prevent is when the user clicks within the Form Panel, such as selecting an item in the Grid or in the Tree, the view scrolls automatically to center the clicked-on row or tree node.
The automatic scrolling action is unintuitive to our users, and we'd like to disable it. Is there a way?

scottmartin
25 Aug 2012, 3:03 PM
See if the following helps:



Ext.override(Ext.selection.RowModel, {
onRowMouseDown: function(view, record, item, index, e) {
view.el.focus(200); / Focus the element in 0.2 seconds - time for the click to happen...
this.selectWithEvent(record, e);
}
});


As shown:
http://www.sencha.com/forum/showthread.php?133983

Scott.

27 Aug 2012, 6:52 AM
Aha, just what I was looking for!
Thanks, ~o)