close
#!/usr/bin/perl -w
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());
}


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 hechian 的頭像
    hechian

    卐只有兩面的盒子卍

    hechian 發表在 痞客邦 留言(0) 人氣()