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

Re: Binding mouse clicks in perl/Tk

by ichimunki (Priest)
on Jul 19, 2002 at 17:03 UTC ( #183314=note: print w/ replies, xml ) Need Help??


in reply to Binding mouse clicks in perl/Tk

You have bound probably not the exact thing you wanted. This binds button release for button one (left button) and two (middle button). Try

$list_box->bind('<Button-1>', sub { my $indx = $list_box->curselection(); my $selected_object = $list_box->get($indx); }); $list_box->bind('<Double-Button-1>', sub{ print “\nuser clicked twice”; });
All of this good event binder information is in perldoc Tk::bind.


Comment on Re: Binding mouse clicks in perl/Tk
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2015-07-04 23:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls