[問題] perl/TK 元件大小怎麼設都會不一樣大!
程式如下, 已經有設ipadx ipady了, 為什麼四個button 還是不一樣大?
#!/usr/bin/perl -w
use Tk;
use strict;
my $mw = MainWindow->new;
$mw->title("tsk converter");
$mw->Button(-text => "TOP", -command => sub { exit })
->pack(-side => 'top',-ipadx => "15",-ipady => "5",-padx => "3" ,-pady => "3",-fill => 'none');
$mw->Button(-text => "BOTTOM",-command => sub { exit })
->pack(-side => 'bottom' ,-ipadx=> "15",-ipady => "5",-padx => "3" ,-pady => "3", -fill => 'none');
$mw->Button(-text => "RIGHT", -command => sub { exit })
->pack(-side => 'right' ,-ipadx => "15",-ipady => "5",-padx => "3" ,-pady => "3", -fill => 'none');
$mw->Button(-text => "LEFT", -command => sub { exit })
->pack(-side => 'left' ,-ipadx => "15",-ipady => "5",-padx => "3" ,-pady => "3", -fill => 'none');
MainLoop;
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 210.68.183.170
Perl 近期熱門文章
PTT數位生活區 即時熱門文章