2011年7月2日 星期六

Perl/Tk testing

use encoding 'big5', STDIN => 'big5', STDOUT => 'big5';
use Tk;
use strict;

my $mw = MainWindow->new;
$mw->title('OPC');
$mw->Label(-text=>'Hello, Tk-world!')->pack;
$mw->Button(
    -text =>'Quit',
    -command => sub{exit},
    -width => 14,
    -height =>3,
)->pack;
$mw->Button(
    -text =>'小畫家',
    -font => "{AR MingtiM BIG-5} 16 {normal}",
    -command => sub{system("mspaint")},
)->pack;
$mw->Label(
    -text =>'Label',
    -font => "{Arial} 16 {normal}",
)->pack;
MainLoop;

沒有留言:

張貼留言