#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = Tk::MainWindow->new(-title => 'Listbox'); my @array = (1..10); my $lb = $mw->Scrolled('Listbox', -listvariable=> \@array, )->pack(); my $b = $mw->Button(-text => 'update', -command => \&update )->pack(); MainLoop; sub update { @array = map{"$_.a"}(1..10); push @array,11; $lb->update; }
In reply to Re: Perl Tk update widget
by zentara
in thread Perl Tk update widget
by sashac88
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |