Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2016-02-11 04:52 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (359 votes), past polls