close
#!/usr/bin/perl -w
use
use
Tk;
use strict;
my $main=MainWindow->new;
my ($label, $text, $button);
$main->title('Test');
$label=$main->Label(
-text=>'Test',
-width=>10
);
$text=$main->Entry(
-width=>10);
$button=$main->Button(
-text=>'Change',
-command=>\&change);
foreach($label, $text, $button){
$_->pack(-side=>"left",-fill=>"both");
}
MainLoop();
sub change(){
$label->configure(-text=>$text->get());
}
全站熱搜
留言列表