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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tk::Table - why ny table is ot visible ?

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Feb 6, 2002
1,851
IL
I have created the following table,but it does not show.
What can be wrong ?
thanks
================================================

my $frm2=$mw->Frame(-background=>'white',-height=>100)->pack(-side=>'top',-fill=>'both');
$i=1;

#define the hotfixes table
my $tl = $frm2->Table(-rows => 5,-columns => 4,-scrollbars => e,-fixedrows => 2,-takefocus => 1,-background=> "grey");
$tl->put($i,1,"Name");
$tl->put($i,2,"Size");
$tl->put($i,3,"Description");
$tl->put($i,4,"Installed");
$tl->see($i,1);
$tl->see($i,2);
$tl->see($i,3);
$tl->see($i,4);
$i++;

Long live king Moshiach !
 
Hi
Missing double quotes here;
Code:
-scrollbar=>"e"

Below a good example:


Code:
use Tk;
use Tk::Table;
use Data::Dumper;
use strict;

my $mw = MainWindow->new;
$mw->geometry("600x250");
my $table = $mw->Table(-rows => 40, -columns => 5, 
                       -scrollbars => "se",
                       -fixedrows => 1, -fixedcolumns => 1,
                       -takefocus => 1)->pack;
foreach my $col (1 .. 5) {
    my $col_header = $mw->Button(-text => "Column " . $col);
    $table->put(0, $col, $col_header);
}
foreach my $row (1 .. 40) {
    my $row_header = $mw->Button(-text => "Row " . $row);
    $table->put($row, 0, $row_header);
    foreach my $col (1 .. 5) {
        my $cell = $mw->Label(-width => 10, -text => $row * $col, -borderwidth => 1, -relief => "solid");
        $table->put($row, $col, $cell);
    }
}


MainLoop;

dmazzini
GSM/UMTS System and Telecomm Consultant

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top