Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by tybalt89 (Monsignor)
on Apr 01, 2019 at 20:36 UTC ( [id://1231958]=note: print w/replies, xml ) Need Help??


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

This works for me.

#!/usr/bin/perl # https://perlmonks.org/?node_id=1231953 use strict; use warnings; use Tk; my $mw = MainWindow->new; $mw->geometry( '+300+300' ); my $button = $mw->Button(-text => 'Test', -command => sub { print "B1 released\n" }, )->pack; $button->bind('<ButtonRelease-1>' => sub { print "bind release\n" } ); MainLoop;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-19 19:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found