Re: Success and a new problem

From: Teo SANKARO <teo_sankaro_at_hotmail.com>
Date: Fri, 06 Aug 2004 17:41:52 -0600
To: prima_at_prima.eu.org

On 6 Aug 2004 at 20:43, Dmitry Karasik wrote:

> > My new problem is that my program doesn't catch mousewheel events. I tried an
> > on_mousewheel sub that does nothing but report that it was caught (print "mousewheel $x,
> > $y, $z\n"), but it's not catching them. Is there something special I have to do? I've looked in
> > TextView (because podview.pl does respond to mousewheel events on my machine), but I
> > can't find where it's doing anything special.

> I'm not sure if this is actual with Prima, but on win32 other programs
> fail to receive mouse wheel events unless the receiver widget is
> focused. OTOH, if podview receives events ok then I'd be almost sure
> that it is a typo, such as misplaced character or package or something
> similar. If you want to be 100% use Prima::EventHook and dump all
> incoming events.

Yes, that was the problem. EventHook showed that MouseWheel wasn't
getting called, so I created on_mouseenter and on_mouseleave subs that
just set and unset focus.

I wonder why the widget doesn't automatically get focus. In any case, my
custom widget is now working properly. Thanks for your help.
Received on Sat 07 Aug 2004 - 01:42:05 CEST

This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:05 CET