Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 63775
Status: resolved
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: DJIBEL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 804.029
Fixed in: 804.029_500



Subject: Tk::ProgressBar configure method, -colors
Dear, Perl 5.10 on XP and 5.12 on Suse Linux I have this program #!/usr/bin/perl use strict; use warnings; use Tk; use Tk::ProgressBar; my $mw = new MainWindow; my $progress = $mw->ProgressBar( -from => 0, -to => 100, -length => 200, -width => 20, )->pack(qw / -pady 10 /); $progress->configure( -colors => [0,'red']); $progress->update; sleep 1; $progress->configure( -colors => [0,'green']); $progress->value(100); $progress->update; sleep 1; $progress->value(0); $progress->configure( -colors => [0,'yellow']); $progress->value(100); $progress->update; MainLoop; Normally, the progress bar must be red, green and yellow (after using configure method), but nothing change. The change happened just if I resize the widget manually with mouse. Have a suggestion to resolve this bug ? Best regards, Djibril
RT-Send-CC: slaven [...] rezic.de
On vista it is the same problem.
On 2010-12-09 08:42:28, DJIBEL wrote: Show quoted text
> On vista it is the same problem.
Same on X11 systems. It seems that using configure does not call anything which forces an internal reconfiguration of the widget. You could do $progress->_layoutRequest(1); before calling update(), but this is a private method and thus it's not really recommended. I'll check if I find another solution. Regards, Slaven
Le Dim 09 Jan 2011 12:54:58, SREZIC a écrit : Show quoted text
> On 2010-12-09 08:42:28, DJIBEL wrote:
> > On vista it is the same problem.
> > Same on X11 systems. > > It seems that using configure does not call anything which forces an > internal reconfiguration of the widget. You could do > > $progress->_layoutRequest(1); > > before calling update(), but this is a private method and thus it's not > really recommended. > > I'll check if I find another solution. > > Regards, > Slaven >
Thank you Slaven. I will wait if you find another solution. Djibril
On 2011-01-09 13:41:16, DJIBEL wrote: Show quoted text
> Le Dim 09 Jan 2011 12:54:58, SREZIC a écrit :
> > On 2010-12-09 08:42:28, DJIBEL wrote:
> > > On vista it is the same problem.
> > > > Same on X11 systems. > > > > It seems that using configure does not call anything which forces an > > internal reconfiguration of the widget. You could do > > > > $progress->_layoutRequest(1); > > > > before calling update(), but this is a private method and thus it's
not Show quoted text
> > really recommended. > > > > I'll check if I find another solution. > > > > Regards, > > Slaven > >
> > Thank you Slaven. > > I will wait if you find another solution. > > Djibril
There's a fix now, it's available from the Perl/Tk repository at github: http://github.com/eserte/perl-tk Regards, Slaven