Help for this page

Select Code to Download


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