Perl/Tk
そんなこんなで、Perl/Tkに落ち着く。昔本を買った記憶があるんだが、
見つからない。
ここを参考にボタンを作ってみた。
広井様に感謝。ソースはこんな感じ
#!/usr/local/bin/perl
use Tk;
$count = 0;
sub push_button {
print "button\n";
}
$top = MainWindow->new();
$top->Button( -text => 'ON/OFF',
-command => \&push_button )->pack( -side => 'left', -fill => 'x');
$top->Button( -text => '1',
-command => \&push_button )->pack( -side => 'left', -fill => 'x');
$top->Button( -text => '2',
-command => \&push_button )->pack( -side => 'left', -fill => 'x');
$top->Button( -text => '3',
-command => \&push_button )->pack( -side => 'left', -fill => 'x');
$top->Button( -text => 'Bomb',
-command => \&push_button )->pack( -side => 'left', -fill => 'x');
MainLoop();
画面はこんな感じ。

キタコレ。
つーか、このPerlもキモイと感じるのは、もう年だからなのか。
最近のPerlの本も買ってこよう。そうしよう。
The comments to this entry are closed.


Comments