Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; use Tk; sub one; my $main = MainWindow->new; my $label1 = $main->Text ( '-width'=>'50' )->pack; my $button = $main->Button ( -text=>'next', -command=>sub{one} )->pack; MainLoop; sub one { my $talk2="number1"; my $talk="this text will be changing after every click of the butt +on."; $label1 -> insert('1.0',"$talk"); my $button = $main->Button(-text=>'next',-command=>sub{two})->pack +; } sub two { # change the text box again }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: perl/tk changing button commands
by Improv (Pilgrim) on Apr 22, 2003 at 17:30 UTC | |
Re: perl/tk changing button commands
by hiseldl (Priest) on Apr 22, 2003 at 21:38 UTC | |
Re: perl/tk changing button commands
by kelan (Deacon) on Apr 23, 2003 at 13:56 UTC |