如何使ttk进度栏饱和而不是翻转?

时间:2019-04-07 05:31:39

标签: python tkinter progress-bar

如果我.step()的{​​{1}}超出最大值,它将翻转:

ttk.ProgressBar

在这种情况下,我可以使其饱和吗(即保持100%)?

我知道我可以写类似的东西:

import Tkinter as tkinter, ttk
tk=tkinter.Tk()
p=ttk.ProgressBar(tk)
p.pack()

p.step(34)
p.step(34)
p.step(34)
#p.cget('value') is now 2.0 instead of 100.0

但这非常令人费解。我想知道是否存在某种内置方式,因为这看起来像是一个非常常见的用例。已检查https://www.tcl.tk/man/tcl/TkCmd/ttk_progressbar.htm

0 个答案:

没有答案
相关问题