in reply to One More bit of Perl/Tk Confusion

Solved it.

my @mpy = (); my @mpe = (); my @mpya = (); my @mpea = (); foreach my $drp ( 0 .. $LST ) { my $row = $drp + 2; $mpy[$drp] = $mw->Entry( -width => 5,-textvariable =>\$mpya[$drp] +)->pack(); $mpy[$drp]->grid( -row => $row, -column => 1, -in => $table ); $mpe[$drp] = $mw->Entry( -width => 5,-textvariable =>\$mpea[$drp]) +->pack(); $mpe[$drp]->grid( -row => $row, -column => 2, -in => $table ); }

At least it prints to the MainWindow properly

Now, why this didn't work the first time I tried it, I have no idea.

Replies are listed 'Best First'.
Re^2: One More bit of Perl/Tk Confusion
by zentara (Cardinal) on Jan 28, 2011 at 17:27 UTC
    Now, why this didn't work the first time I tried it, I have no idea.

    I may be wrong here, since all I ever use is pack, BUT I believe that you can't mix geometry managers, like pack and grid.... use one or the other, or expect odd results.


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

      That and I probably need new glasses. Funny how '{' and '[' look alike after a while. :)

      BUT, the project is working and I don't have to spend a weekend configuring Wampserver on my son's computer at school.