prevent scrolledpanel scrolling to a widget that has focus?

Sometime back, in response to someone who was having jumping issues in
a wx.lib.scrolledpanel, Robin wrote[1] this:

"IIUC the scrolling is coming from one of the features of
ScrolledPanel. When a child window gets the focus then it will try to
scroll itself such that the entire child is visible."

My question: can that feature be turned off? (WinXP, py2.5, wx.2.8.x)

I want to use the mouse wheel/arrows to scroll the window and so have
had to bind an wx.EVT_MOTION and then in its handler call .SetFocus()
on the scrollingpanel to allow that. But what winds up happening is
that it causes the scrolledpanel to "jump" when it regains focus, such
as when the cursor re-enters the panel. In my case, users would not
want the panel to scroll when they simply re-enter the panel.

Thanks,
Che

[1] http://wxpython-users.1045709.n5.nabble.com/Scroll-Jump-with-Nested-Panes-Propagating-Size-During-Dynamic-Layout-Changes-td2370404.html

I found I was able to avoid this by overriding
ScrolledPanel.OnChildFocus(event) - works on Mac and Linux, anyway.

-Nat

···

On Sat, Jul 7, 2012 at 4:50 PM, C M <cmpython@gmail.com> wrote:

Sometime back, in response to someone who was having jumping issues in
a wx.lib.scrolledpanel, Robin wrote[1] this:

"IIUC the scrolling is coming from one of the features of
ScrolledPanel. When a child window gets the focus then it will try to
scroll itself such that the entire child is visible."

My question: can that feature be turned off? (WinXP, py2.5, wx.2.8.x)

Thanks!--that appears to work for me on Windows, too. (Thanks to
Andrea[1], too, for answering this long ago, which I found once I knew
what to Google for once Nat clued me in).

Che

[1]http://wxpython-users.1045709.n5.nabble.com/R-scrolling-events-question-td2326729.html

···

On Sat, Jul 7, 2012 at 7:57 PM, Nat Echols <nathaniel.echols@gmail.com> wrote:

On Sat, Jul 7, 2012 at 4:50 PM, C M <cmpython@gmail.com> wrote:

Sometime back, in response to someone who was having jumping issues in
a wx.lib.scrolledpanel, Robin wrote[1] this:

"IIUC the scrolling is coming from one of the features of
ScrolledPanel. When a child window gets the focus then it will try to
scroll itself such that the entire child is visible."

My question: can that feature be turned off? (WinXP, py2.5, wx.2.8.x)

I found I was able to avoid this by overriding
ScrolledPanel.OnChildFocus(event) - works on Mac and Linux, anyway.