Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Position 3 labels in one row

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Feb 6, 2002
1,851
IL
HI,

need to position 3 labels at in row at the bottom of $frm1.
Below code does not show anything,window does not come up at all.
Any idea ? thanks


my $mw = new MainWindow;
$mw->configure(-title=>"colorserver_update.exe Ver $VERSION on $computer"); # Main Window
my $frm1=$mw->Frame(-height =>10)->pack(-side=>'top',-fill=>'x');
$frm1->Label(-text => 'Step 1: check for available updates',-anchor => 'nw')->pack(-side=>'top',-fill=>'x');

my $LABEL=$frm1->Label(-background=>'white',-text => $Name[$i],-font=>[courier => 9],-width=> 30,-anchor=> 'w')->pack(qw/-side bottom -anchor w/);
my $SIZE=$frm1->Label(-background=>'white',-text => $Size[$i],-font=>[courier => 9],-width =>30,-anchor=> 'w')->pack(qw/-side bottom -anchor w/);
my $DESCRIPTION=$frm1->Label(-background=>'white',-text => $Description[$i],-font=>[courier => 9],-width=> 30,-anchor=> 'w')->pack(qw/-side bottom -anchor w/);

$LABEL -> grid(-row=>1, -column=>1);
$SIZE -> grid(-row=>1, -column=>2);
$DESCRIPTION -> grid(-row=>1, -column=>3);

MainLoop;


Long live king Moshiach !
 
I would have a look at SpecTcl1.1 if you have not alredy.
 
Code:
use Tk;
my $mw = new MainWindow;                                                  
$mw->configure(-title=>"colorserver_update.exe Ver $VERSION on $computer");                                                                                # Main Window 
my $frm1=$mw->Frame(-height =>10)->pack(-side=>'top',-fill=>'x');
$frm1->Label(-text => 'Step 1: check for available updates',-anchor  => 'nw')->pack(-side=>'top',-fill=>'x');

my $fgrid = $mw->Frame()->pack ( -side => 'top' ) ;
my $flabel = $fgrid->Frame()->pack ( -side => 'left' , -padx => 4 ) ;

$flabel->Label ( -text => 'LABEL1' ) 	->pack ( -side => 'left' , -anchor => 'e' ) ;
$flabel->Label ( -text => 'LABEL2' ) 	->pack ( -side => 'left' , -anchor => 'e' ) ;
$flabel->Label ( -text => 'LABEL3' ) 	->pack ( -side => 'left' , -anchor => 'e' ) ;

MainLoop;

dmazzini
GSM/UMTS System and Telecomm Consultant

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top