Tcl/Tk: How to create a progress bar with a status text inside? -
i want create progress bar using tcl/tk >= 8.5 not show progress in graphical way percentage of progress number (centered) within progress bar (e. g. "12 %").
i thinking overlaying progress bar , label transparently or 1 making parent of other widget not figure out solution.
any ideas?
here simple program frame:
proc counter {} { {set 0} {$i < 100} {incr i} { puts "$i" after 25 .pb configure -value $i update idletask } } ttk::progressbar .pb -orient horizontal -maximum 100 -length 400 -value 0 button .bt -text "start counter" -command counter pack .pb pack .bt
usually, don't. standard platform rendering of progress bars doesn't support such label.
however, can hack frames , labels (and clever use of place). wrote this page long ago has links code that. should still work, might not how want: standard these things should has changed lot on years.
i hate self-promotion, don't know of other code this.

Comments
Post a Comment