my $ent1 = $table->Entry (
-font => "verdana 10",
-validate => 'key',
# Pass button widget and a ref to $filled into callback. Need a
# ref because we manipulate $filled in the callback
-vcmd => [\&onEdit, $press, \$filled],
)
####
sub onEdit {
my ($button, $filled, $new, $edit, $current, $idx, $type) = @_;
return 1 if $new eq $current;
####
if (length $new && !length $current) {
++$$filled;
} elsif (!length $new && length $current) {
--$$filled;
}
####
if ($$filled == kRows * kCols) {
$button->configure (-state => 'normal');
} else {
$button->configure (-state => 'disabled');
}