in reply to tk bind

Unless you show some of your code, you are only going to get generic answers.

use warnings; use strict; use Tk; my $top = MainWindow->new; $top->Button( -text => 'Push Me', -command => \&mysub )->pack; $top->bind('<Return>', \&mysub); MainLoop; sub mysub{ $top->Label( -text => 'You pressed it!' )->pack; }

Replies are listed 'Best First'.
Re^2: tk bind
by Anonymous Monk on Jun 17, 2005 at 15:32 UTC
    my code was basically that posted by thundergnat my problem was that i was getting the function called when the program first ran (i guess coz i had to hit return to run the program) i thought i was going about it completly the wrong way but obviously not coz now it works so thanks a lot