This works for me:
use strict; use warnings; use Tk; my @array = ("File1.txt", "File2.txt", "File3.txt"); my $main = MainWindow->new (); while (@array) { my $name=pop @array; $main->Button ( -text => "Open $name", -command => sub{`notepad $name`} )->pack(); } MainLoop;
In reply to Re^3: creating multiple widgets at runtime
by GrandFather
in thread creating multiple widgets at runtime
by arunmep
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |