in reply to What is the best way to arrange widgets using TK?
You were close, but you forgot -row:
maweuse Tk; my $top = new MainWindow(); my %density = (A=>1,B=>2,C=>3); my $row = 0; foreach (sort keys(%density)) { my $keytext = $top->Label( -height=>1,-width=>10,-text=>$_,-justify=>'left')->grid(-row=> +$row,-column=>0); my $denbox = $top->Entry( -textvariable=>\$density{$_},-width=>5)->grid(-row=>$row,-colu +mn=>1); $row++; } MainLoop();
|
|---|