use Tk; use Tk::Table; my $mw = MainWindow->new; my $table = $mw->Table->pack; my $r; foreach $r (0..5) { my $c; foreach $c (0..5) { $table->put($r,$c,"$r,$c"); $table->get($r,$c)->bindtags([$table]); # messy } } $table->bind('<1>', sub { my ($w) = @_; my ($row,$col) = $table->Posn($w); print "row=$row, col=$col\n"; $w->configure(-background=>'grey'); }); MainLoop;