perl之达人请进有这样一段code
#!/usr/bin/perl -w
use Tk;
my $mw = MainWindow -> new();
$mw -> configure (-width => 200, -height => 200);
my $tf = $mw -> Entry (-width => 10, -background => "white") -> pack (-side => "left");
$tf -> insert ("end", "kao");
my $button = $mw -> Button (-text => "GO", -background => "white") -> pack (-side => "right");
MainLoop();
运行之后发现textfield $tf就不是editable的了,但是如果我把顺序换过来,button在tf的前面的话,就可以了。
#!/usr/bin/perl -w
use Tk;
my $mw = MainWindow -> new();
$mw -> configure (-width => 200, -height => 200);
my $button = $mw -> Button (-text => "GO", -background => "white") -> pack (-side => "right");
my $tf = $mw -> Entry (-width => 10, -background => "white") -> pack (-side => "left");
$tf -> insert ("end", "kao");
MainLoop();
请问是为什么?
...just realized that i didn't install perl-tk...