CC: | bug-tk [...] rt.cpan.org |
Subject: | [Tk::ProgressBar] Suggestion update (Tk-804.028) |
Date: | Fri, 27 Feb 2009 20:54:04 +0000 (GMT) |
To: | slaven [...] rezic.de |
From: | djibrilo <djibrilo [...] yahoo.fr> |
Dear slaven,
Tk version : Tk-804.028 and Tk-804.028_501
I want to tell thank you for your module because It's work very well.
I want to suggest you 2 updates to your [Tk::ProgressBar module.
1 - When I use value method ( $Widget->value($Value); ), I have to refresh the widget
with (update) if I want to see the modification inthe widget.
Can you add an update widget in you code, I have test and it's work well.
ProgressBar.pm
sub value {
my $c = shift;
my $val = defined($c->{'-variable'})
? $c->{'-variable'}
: \$c->{'-value'};
my $old = defined($$val) ? $$val : $c->{Configure}{'-from'};
if(@_) {
my $value = shift;
$$val = defined($value) ? $value : $c->{Configure}{'-from'};
_layoutRequest($c,2);
}
$c->update; # <===== add an update here
$old;
}
2- It's possible to create another option in constructeur new as -text to add this text in the rectangle (for ex 10%) ?
If you want my participation I can try to understand your code and help you.
Best regards
Djibril