Fortschritts-Anzeige klemmt
Verfasst: Sonntag 12. November 2017, 22:33
Abend Forum
Ich habe mir eine "Fortschrittsanzeige" gebastelt, die anhand der verstreichenden Zeit auch zu laufen scheint. Aber im tkinter-Fenster wird nur der Schluss dieser Anzeige angezeigt.
Ich erhalte also nur die Anzeige von Zeile 126
Wie gesagt, von der Zeit her scheint es zu funktionieren, nur die Anzeige im tkinter-Fenster scheint die einzelnen Schritte nicht mit zu gehen?
Gruß jts
Ich habe mir eine "Fortschrittsanzeige" gebastelt, die anhand der verstreichenden Zeit auch zu laufen scheint. Aber im tkinter-Fenster wird nur der Schluss dieser Anzeige angezeigt.
Code: Alles auswählen
# Rechte Fortschritt-Anzeige Status-Feld
delay = 0.5
displaycounter = 1
if displaycounter == 1:
time.sleep(delay)
fwddisplay = "●○○○○○○○○○○○○○○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 2:
time.sleep(delay)
fwddisplay = "●●○○○○○○○○○○○○○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 3:
time.sleep(delay)
fwddisplay = "●●●○○○○○○○○○○○○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 4:
time.sleep(delay)
fwddisplay = "●●●●○○○○○○○○○○○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 5:
time.sleep(delay)
fwddisplay = "●●●●●○○○○○○○○○○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 6:
time.sleep(delay)
fwddisplay = "●●●●●●○○○○○○○○○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 7:
time.sleep(delay)
fwddisplay = "●●●●●●●○○○○○○○○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 8:
time.sleep(delay)
fwddisplay = "●●●●●●●●○○○○○○○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 9:
time.sleep(delay)
fwddisplay = "●●●●●●●●●○○○○○○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 10:
time.sleep(delay)
fwddisplay = "●●●●●●●●●●○○○○○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 11:
time.sleep(delay)
fwddisplay = "●●●●●●●●●●●○○○○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 12:
time.sleep(delay)
fwddisplay = "●●●●●●●●●●●●○○○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 13:
time.sleep(delay)
fwddisplay = "●●●●●●●●●●●●●○○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 14:
time.sleep(delay)
fwddisplay = "●●●●●●●●●●●●●●○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 15:
time.sleep(delay)
fwddisplay = "●●●●●●●●●●●●●●●○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 16:
time.sleep(delay)
fwddisplay = "●●●●●●●●●●●●●●●●○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 17:
time.sleep(delay)
fwddisplay = "●●●●●●●●●●●●●●●●●○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 18:
time.sleep(delay)
fwddisplay = "●●●●●●●●●●●●●●●●●●○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 19:
time.sleep(delay)
fwddisplay = "●●●●●●●●●●●●●●●●●●●○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 20:
time.sleep(delay)
fwddisplay = "●●●●●●●●●●●●●●●●●●●●"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1
if displaycounter == 21:
time.sleep(delay)
fwddisplay = "○○○○○○○○○○○○○○○○○○○○"
fourLabel = Label(root, text= fwddisplay , font=("TimesNewRoman", 15), width=36, anchor=("w"), fg="orange")
fourLabel.place(x=428,y=345)
displaycounter = displaycounter + 1

Wie gesagt, von der Zeit her scheint es zu funktionieren, nur die Anzeige im tkinter-Fenster scheint die einzelnen Schritte nicht mit zu gehen?
Gruß jts