Hello everyone,
I am a newbie on perl/tk. I wrote a code as below, I want to make the size of
"Versions Frame" and "Manual Frame" even, but the "versions Frame" always
bigger than the "Manual Fram", can someone help me out? Thanks.
----------------------------------------------------------------------
#!/home/jiem/bin/perl -w
use lib "/home/jiem/personal/perl/perllib";
use Tk;
use Tk::LabFrame;
# define variables
my $tool_name = "";
my $version = "";
my $manual = "";
# define main window
my $mw = MainWindow->new;
$mw->geometry ("450x300+0+0");
$mw->resizable (0, 0);
$mw->title ("Silvaco Tool's World");
# Product list
$prod_frame = $mw->LabFrame (-relief => 'ridge',
-bd => 1,
-label => "Product List",
-labelside=>'acrosstop'
)->pack (-side => 'left', -anchor => 'w', -fill => 'y');
$prod_frame->Radiobutton (-relief => 'flat',
-variable=>\$tool_name ,
-text => "Smartspice",
-value => "Smartspice",
)->pack;
$prod_frame->Radiobutton (-relief => 'flat',
-variable=>\$tool_name ,
-text => "Deckbuild ",
-value => "Deckbuild",
)->pack;
$prod_frame->Radiobutton (-relief => 'flat',
-variable=>\$tool_name ,
-text => "Scholar ",
-value => "Scholar",
)->pack;
$prod_frame->Radiobutton (-relief => 'flat',
-variable=>\$tool_name ,
-text => "Discovery ",
-value => "Discovery",
)->pack;
$prod_frame->Radiobutton (-relief => 'flat',
-variable=>\$tool_name ,
-text => "Tonyplot ",
-value => "Tonyplot",
)->pack;
$prod_frame->Radiobutton (-relief => 'flat',
-variable=>\$tool_name ,
-text => "Devedit ",
-value => "Devedit",
)->pack;
# Bottom Frame
$bot_frame = $mw->Frame (-relief => 'ridge',
-bd => 1,
)->pack (-side => 'bottom', -anchor => 's', -fill => 'x');
$run_button = $bot_frame->Button (-text => "Run",
-command => sub { exit; },
-relief => "ridge",
)->pack (-side => 'left', -expand => 1);
$manual_button = $bot_frame->Button (-text => "Manual",
-command => sub { exit; },
-relief => "ridge",
)->pack (-side => 'left', -expand => 1);
$exit_button = $bot_frame->Button (-text => "Quit",
-command => sub { exit; },
-relief => "ridge",
)->pack (-side => 'left', -expand => 1);
# Versions Frame
$ver_frame = $mw->LabFrame (-bd => 1,
-label => "Versions",
-labelside=>'acrosstop'
)->pack (-side => 'left', -expand => 1, -fill => 'both');
$ver_listbox = $ver_frame->Scrolled ("Listbox",
-scrollbars =>"e",
)->pack(-fill => 'both', -expand => 1);
# Manual Frame
$man_frame = $mw->LabFrame (-bd => 1,
-label => "Manual",
-labelside=>'acrosstop'
)->pack (-side => 'right', -expand => 1, -fill => 'both');
$man_listbox = $man_frame->Scrolled ("Listbox",
-scrollbars =>"e",
)->pack(-fill => 'both', -expand => 1);
MainLoop;
____________________________________________________________________
Get free email and a permanent address at http://www.amexmail.com/?A=1