in reply to One More bit of Perl/Tk Confusion

What is $mpy_mpe? You only print to filehandles, the default selected handle, STDOUT, often ends in a DOS windows, Tk widgets usually don't have a print method, you usually use insert method

Replies are listed 'Best First'.
Re^2: One More bit of Perl/Tk Confusion
by Dandello (Monk) on Jan 27, 2011 at 21:03 UTC

    $mpy_mpe[$b]is item $b in the array @mpy_mpe. In this case $mpy_mpe[0] = my $mpy_1 = $mw->Entry( -width => 5, -textvariable => \$mpy1 )->pack();\n$mpy_1 -> grid(-row=>3,-column=>1, -in => $table);\nmy $mpe_1 = $mw->Entry( -width => 5, -textvariable => \$mpe1 )->pack();\n$mpe_1 -> grid(-row=>3,-column=>2, -in => $table);\n

    Now, I can generate all 250+ rows that I need, but I only want to show the first 5, 10 or whatever is in $LST of them.

      Why not keep a count of how many you've added, and stop adding when the count gets too big?

        Automatically?

        I certainly know how to do it straight to html - that's a no-brainer.

        foreach my $b (0 .. $LST){ print qq{my html or CGI formatted row here} or die 'unable to print'; }

        I'm trying to emulate the same function in Tk. I don't know how many rows the final user is going to need. And once it's handed over, the person using it will not be in a position to edit it.