Hey,

When I ran it on windows machine with activestate perl, both frames looked
the same. Do they change size when you fill up the Listboxes?

Also use a loop for your radiobuttons, less code:
#Radiobuttons
foreach (qw/Smarpiece Deckbuild Scholar Discovery Tonyplot Devedit/){
        $prod_frame->Radiobutton (-relief => 'flat',
                          -variable=>\$tool_name ,
                          -text => "$_",
                          -value => "$_",
                          -anchor => 'w',
                          -width => 17,
                         )->pack;
}

Iso
-----Original Message-----
From: Jie Meng [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 4:43 PM
To: [EMAIL PROTECTED]
Subject: help on perl/tk


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

Reply via email to