From: Mattia B. <mb...@ds...> - 2001-09-15 21:20:25
|
You didn't say platform/wxPerl version I'll assume MSW/0.07 > I've got a test program that I'm messing around with to get the hang of the > wxPerl API. I'm trying to use EVT_TOOL_ENTER to captures mouse events over > a toolbar button. However, when I move my mouse over the button the > subroutine does not execute. I was wondering, if I am defining the > EVT_TOOL_ENTER definition wrong, or in the wrong spot. > > Could someone please see if I'm doing it right? Well, for some value of right... the code *is* right, but ( after some debugging ) *looks* like a bug in wxWindows > I've have attached my sample program code. Thanks for the sample code! for now, use EVT_TOOL_ENTER( $this, -1, \&Func ); and use $event->GetInt() in the event handler to discriminate between the tools ( of course it is an hack, but I need more investigation for a proper fix ) BTW, as you might have noticed, putting -1 as the id in the event macro, acts as a wildcard: matches all ids HTH Mattia |