[wx-dev] scrolling code is wrong :-)

Paul Cornett pc-wx at bullseye.com
Sat Jun 23 10:53:26 PDT 2007


Robert Roebling wrote:
> Vadim Zeitlin wrote:
> > Robert Roebling wrote:
> > 
> > RR> > > and the problem boils down to the
> > RR> > > fact that wxScrollWinEvents are generated both
> > RR> > > from wxWindow's scrollbars (after a user pressed
> > RR> > > on the arrow-buttons in the scrollbar) as well
> > RR> > > from the code in wxScrollHelper.
> > 
> > A simple solution would then seem to be to block the GTK+
> > events generated from our own code
> 
> I'm doing this and it seems to work without modifying
> and non-GTK code, do I'll probably settle for this.

I believe your analysis, and fix, are incorrect. SetScrollPos does
_not_ cause a wxScrollWinEvent. The problem is that after the mouse
wheel event is processed, it is getting passed on to the native
GtkScrolledWindow. The proper fix is for
wxScrollHelperEvtHandler::ProcessEvent to do the same thing it does
after calling HandleOnScroll, that is, indicate that the event has
been processed.




More information about the wx-dev mailing list