Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Tk : how to map ButtonRelease to left mouse button?

by Discipulus (Canon)
on Apr 01, 2019 at 19:55 UTC ( [id://1231957]=note: print w/replies, xml ) Need Help??


in reply to Tk : how to map ButtonRelease to left mouse button?

Hello Special_K,

It must be 1. Play the following snippet:

use strict; use warnings; use Tk; my $mw = tkinit; $mw->bind('<ButtonRelease>' => sub{ my($widget) = @_; my $e = $widget->XEvent; # get event object # ($keysym_text, $keysym_decimal) = ($e->K, $e->N) print "Button number ",$e->N," was released\n" } ); #ADD also this if unsure: #$mw->bind('<ButtonRelease-1>' => sub{ # print "Button number ONE was released\n" # } #); MainLoop;

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1231957]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-04-19 02:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found