in reply to Perl/Tk and anonymous widgets
my %hash; # to store all the widgets in sub aaa { $count = 1; while($count <= $entry_amount->get) { $label_g = $count_g; $button_b = $count_b; $hash{$count}{'frame'} = $mw->Frame() ->pack(-side=>top); $hash{$count}{'label'} = $hash{$count}{'frame'}->Label(-text=>"Variable") ->pack(-side=>left, -padx=>5, -pady=>5); $hash{$count}{'entry'} = $hash{$count}{'frame'}->Entry(-width=>30) ->pack(-side=>left, -padx=>5, -pady=>5); $mw->update; $count++; } }
|
|---|