Subject: | Typo in variable + cannot set width of Entry |
Hi!
There is a small typo in ToolEntry(). When attaching the balloonmsg to the entry, you refer to
$b. However, the current entry is stored in $l.
Also, the width is set hardcoded by 5, there is no way to override it.
Please find a solution to both problems:
sub ToolEntry {
my $self = shift;
my %args = @_;
my $m = delete $args{-tip} || '';
# TIMTOWTDI: you could also type: $args{-width} = 5 unless exists( $args{-width} );
my $w = delete $args{-width} || 5;
my $l = $self->{CONTAINER}->Entry(%args, -width => $w);
push @{$self->{WIDGETS}} => $l;
$self->_packWidget($l);
$self->{BALLOON}->attach($l, -balloonmsg => $m) if $m;
return $l;
}
hth, Alex