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();
请问是为什么?[icky (6-13 16:39, Long long ago)]
[ 传统版 |
sForum ][登录后回复]1楼
perl-tk version: 804.027[icky (6-13 16:41, Long long ago)] [ 传统版 | sForum ][登录后回复]2楼
(引用 icky:perl-tk version: 804.027)真是扯,同样的code放到另外一台fc5的机器上就正常了,也是804.027建议大家不要装fedora 7先,很不稳定[icky (6-14 13:00, Long long ago)] [ 传统版 | sForum ][登录后回复]3楼
(引用 icky:真是扯,同样的code放到另外一台fc5的机器上就正常了,也是804.027建议大家不要装fedora 7先,很不稳定)oh...never liked fedora anyway[Bird (6-14 23:34, Long long ago)] [ 传统版 | sForum ][登录后回复]4楼
(引用 Bird:oh...never liked fedora anyway)佳哥这话有点跑题……[老黑 (6-15 2:38, Long long ago)] [ 传统版 | sForum ][登录后回复]5楼
...just realized that i didn't install perl-tk...[hash (6-15 19:56, Long long ago)] [ 传统版 | sForum ][登录后回复]6楼