You are correct. Build all of your widgets ahead of time, and control their visibility by packing/packForgetting them. Your memory usage will stay constant that way. If you are talking about many widgets, that may never get used, only build them as you need them, and store them in a hash or array for easy manipulation. So you can do something like this, where you can set the variable for the checkbox, to $num, and when you click the checkbox, the $num will be sent to the sub.
my %entry; #global to store entries
sub get_entry{
my $num = shift;
if ( !Exists( $entry{$num}{'entry'} ) {
$entry{$num}{'entry'} = $frame->Entry()->pack();
}
else {
#repack
$entry{$num}{'entry'}->pack();
}
}
| [reply] [d/l] |
awesome, thank you very much
| [reply] |