|
From: Michael K. <mi...@mu...> - 2005-02-25 22:17:45
|
On Fri, 25 Feb 2005, Kevin Walzer wrote:
> Michael,
>
> OK, I think I've gotten the patches applied correctly, and the new
> version of Tile built. I have written a little script to display the
> barber pole, and I'm not getting it right (nothing displays but the
> "trough" where the progress bar should be). Can you take a look and let
> me know what I'm doing wrong?
What you have should work. I'd have to guess the patches weren't applied
correctly, or it's using your unpatched version or something. Perhaps the
attached will work better if the former (unified diff format).
> package require tile
>
> ttk::progress .p1 -from 0 -to 0
> pack .p1
This should actually be sufficient to get the barber pole, as currently
implemented. It uses timer events to animate, rather than relying set
calls to refresh. Otherwise the animation would be anything but smooth.
To turn off the barber pole:
.p1 config -to 1; # anything non-zero, really
> .p1 set 0
> set i1 0
>
> proc showprog {} {
> global i1
> incr i1
> .p1 set $i1
> after 10 showprog
> }
>
> after 10 showprog
This will actually never set the value beyond 0 (with or without the
patch): the set value gets capped at the -to value. i.e.,
.p1 config -to 0
.p1 set 10000
puts [.p1 get]
...will print 0.
--
Michael Kirkham
www.muonics.com |