I am just getting started with Tk to make GUIs in Perl and am trying to make a button with a menu that appears when the user left-clicks on it. The following code does not produce any behavior when the button is left-clicked:
$pm->command(-label=>"rerun", -command=>[\&rerun, $dataset] );
$button->bind('<ButtonRelease-1>' => [ sub { push @menulist, $pm; $pm-
+>post( $_[1], $_[2] ) }, Ev('X'), Ev('Y') ] );
On the other hand, the following does produce the desired menu when the button is right-clicked:
$pm->command(-label=>"rerun", -command=>[\&rerun, $dataset] );
$button->bind('<ButtonRelease-3>' => [ sub { push @menulist, $pm; $pm-
+>post( $_[1], $_[2] ) }, Ev('X'), Ev('Y') ] );
If ButtonRelease-3 corresponds to the right mouse button, what corresponds to the left mouse button, if not ButtonRelease-1? I also tried ButtonRelease-2 but that didn't do anything either.