delmejo has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -wd use Tk; $main = MainWindow->new(); # Container frame for dynamic subframes $fmain = $main->Frame(-borderwidth=>0)->pack(-side=>'top',-fill=>'both +'); # Dymanic subframes for ($a=0;$a<=1;$a++) { $frame[$a] = $fmain->Frame(-borderwidth => 0)->pack(-side=>'left'); $frame[$a] -> Label(-text => "Frame " . \$whichframe[$a] ) -> pack; $frame[$a] -> Button(-text => "Delete frame", -command => \&rmv ) -> p +ack; } MainLoop; sub rmv { #Need to delete the frame here. }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Multiple frames
by choroba (Cardinal) on Aug 26, 2013 at 07:37 UTC | |
by delmejo (Initiate) on Aug 27, 2013 at 22:17 UTC | |
by delmejo (Initiate) on Aug 28, 2013 at 17:18 UTC | |
by delmejo (Initiate) on Aug 31, 2013 at 13:39 UTC | |
by Anonymous Monk on Aug 31, 2013 at 14:46 UTC | |
| |
by delmejo (Initiate) on Aug 28, 2013 at 17:57 UTC | |
by delmejo (Initiate) on Aug 31, 2013 at 00:59 UTC | |
by Anonymous Monk on Aug 31, 2013 at 06:50 UTC |