in reply to Delaying changes to widget layout with Perl/Tk
#!/usr/bin/perl use warnings; use strict; use Tk; my $config; my $mw = MainWindow->new(-title=>"Demo"); $mw->withdraw; get_config($mw); MainLoop; sub setup_mw{ my $label = $mw->Label(-text=> $config)->pack(); $mw->deiconify; $mw->raise; } sub get_config { my $parent = shift; #collect your config here $config = 'hoohah'; my $win = $parent->Toplevel(-title=>'config window'); my $Bttn = $win->Button( -text=>"I'm done configuring, so press me", -command=> sub{ $win->destroy; setup_mw(); } )->pack( ); } __END__
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Delaying changes to widget layout with Perl/Tk
by merrymonk (Hermit) on Sep 24, 2007 at 19:05 UTC | |
by zentara (Cardinal) on Sep 24, 2007 at 19:50 UTC |