in reply to
Tk event bindings - single vs. double click
I'm not sure if there's an easy way to tell if a it's a double-click within the sub-routine (aside from forcing one sleep of a second and checking if the sub is called again at the end of that second).
However, according to the Perl Cookbook 1st edition, recipe 15.19, you can bind a subroutine to a <Double-Button> like this:
# permit viewing by binding double-click
$l->bind( '<Double-Button>' => \&view );
I haven't any experience with it though. Chapter 14 of Learning Perl/Tk
mentions it as <Double-Button-1> though. Of course, Learning Perl/Tk is no longer in print, so you'd have to buy it second-hand. You might also wish to take a look at the second edition of the Perl Cookbook, as it might have more details. Give these a try and let us know what works/doesn't work. . .
- - arden.