Syntactic Confectionery Delight | |
PerlMonks |
Re: TK::ProgressBar Color updateby zentara (Archbishop) |
on Oct 08, 2010 at 13:08 UTC ( [id://864200]=note: print w/replies, xml ) | Need Help?? |
Hi again, while hacking on this problem, I noticed 1 peculiarity, the color changes work as you would expect, IF you resize the $mw after hitting the buttons. As an example of this behavior, I rewrote the script above to use a timer (instead of a hackish select delay) and just used configure on the -colors. If you run this script, and hit Stop, the bar will turn red only after you just SLIGHTLY resize the window. The same occurs after a second START, the bar returns to original colors after a slight resize of the window. I tried update, packPropagate, idletasks, etc. to stimulate the update, but no luck. Does anyone know how to trigger the progressbar's deep update without a window resize? I suppose as a hack, the Start and Stop buttons could include some code to do a 1-pixel resize of the $mw. :-)
I'm not really a human, but I play one on earth. Old Perl Programmer Haiku ................... flash japh
In Section
Seekers of Perl Wisdom
|
|