in reply to What is the best way to arrange widgets using TK?

I like the procedural form of grid, so I don't have to care about -row and -column. Here's your sample rewritten:
foreach (sort keys(%density)) { Tk::grid( $mb->Label( -text => $_, -anchor => "w", ), $mb->Entry( -textvariable => \$density{$_}, -width => 5 ), -sticky => "ew", ); }

Replies are listed 'Best First'.
Re^2: What is the best way to arrange widgets using TK?
by rinceWind (Monsignor) on Aug 24, 2004 at 20:35 UTC
    Interestingly, what Tk::grid sees with the "procedural form" of call, is identical to invoking the grid method on the leftmost widget, and passing in the remaining widgets as parameters.

    This is because a method call passes in the object as the first parameter.

    --
    I'm Not Just Another Perl Hacker