Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Perl/Tkx Mousewheel

by Crian (Chaplain)
on Mar 10, 2009 at 14:41 UTC ( #749615=note: print w/replies, xml ) Need Help??


in reply to Perl/Tkx Mousewheel

In one of my programs i found this lines:

$mw->bind('<MouseWheel>', [ sub { my $wert = -($_[1]/120); $wert = '+' . $wert unless $wert =~ /^-/; animation_schalten($wert); }, Tk::Ev('D') ] );

Perhaps it helps?

Replies are listed 'Best First'.
Re^2: Perl/Tkx Mousewheel
by chiron (Novice) on Mar 10, 2009 at 14:50 UTC
    Using:
    $canvas->g_bind("<MouseWheel>", [ sub { my $wert = -($_[1]/120); $wert = '+' . $wert unless $wert =~ /^-/; print $wert . "\n"; }, Tkx::Ev('D') ]);
    just gives me '-0' all the time

      Note: I use Tk::Ev not Tkx::Ev. I don't know, but it might be a difference.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://749615]
help
Chatterbox?
[Eily]: I just wrote a oneliner to solve a (non perl) colleague's problem, and it worked on the first try
[Eily]: and he wasn't impressed
1nickt adds gingersnaps to the platter on the sideboard.
[Eily]: sure it was a pretty standard one liner (of the $h{$1} = $2 if /regex/; END { pp \%h; } variety), but he's not supposed to know that!
[Eily]: what's the point of writing perl if people aren't impressed :P
[sierpinski]: Haha
[Discipulus]: i'm with you!
[Discipulus]: with eskimo greeting is a little bit impressing, anyway

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2017-04-26 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (482 votes). Check out past polls.