added indeterminate progressbar

This commit is contained in:
Martin Putzlocher 2021-12-28 14:01:44 +01:00
parent 2862ec871c
commit c976aabdba

View File

@ -17,7 +17,6 @@ class Controller(object):
if self.count == steps or self.interrupt:
print(self.count)
self.running = False
self.finish()
return 0
else:
@ -33,7 +32,10 @@ class Controller(object):
def set_running(self):
if not self.interrupt:
self.running = True
self.app.p_indet.start()
self.app.b.configure(text="Abort", command=self.set_interrupt)
else:
pass
def set_reset(self):
self.count = 0
@ -42,6 +44,8 @@ class Controller(object):
self.app.b.configure(text="Start", command=self.run_process)
def finish(self):
self.running = False
self.app.p_indet.stop()
print("finished.")
self.app.b.configure(text="Restart", command=self.set_reset)
@ -63,6 +67,9 @@ class Application(tk.Tk):
self.b = ttk.Button(master=self, text="Start", command=self.con.run_process)
self.b.grid(row=1, column=0)
self.p_indet = ttk.Progressbar(master=self, length="200", maximum=10, mode="indeterminate")
self.p_indet.grid(row=2,column=0)
# --------------------------
# Execution
# --------------------------