in reply to creating multiple widgets at runtime
Move MainLoop; outside the while loop:
while(@array) { $file=pop @array; $top->Button(-text => "Click Me",-command => sub{ system "start c:/W +INNT/system32/notepad.exe $file" })->pack(); $x=$x+10; } MainLoop;
Note that c:/WINNT/system32/notepad.exe is not very portable. Use either Notepad $file or just $file (if $file has a .txt extension).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: creating multiple widgets at runtime
by arunmep (Beadle) on Jul 25, 2005 at 03:59 UTC | |
by GrandFather (Saint) on Jul 25, 2005 at 04:07 UTC |