I've seen some solutions to change the color of the Progressbar, however, when trying to apply them, it doesn't work and stays green.
I am probably missing a stupid thing.
This is a progressbar that is vertical, and it takes 10 seconds to fill. All I want is that the bar becomes red instead of green.
from tkinter import *
from tkinter.ttk import *
import time
root = Tk()
root.geometry("500x500")
seconds = 10
s = Style()
s.configure("red.Vertical.TProgressbar", foreground = 'red', background = 'red', throughcolor = 'red')
progress = Progressbar(root, orient = VERTICAL, length = 9999999, mode = 'determinate')
progress.configure(style = 'red.Vertical.TProgressbar')
progress.pack(ipadx = 200000, padx = 50, pady = 50)
start_time = time.time()
elapsed_time = time.time() - start_time
while elapsed_time/seconds*100 < 100:
progress['value'] = elapsed_time/seconds*100
elapsed_time = time.time() - start_time
root.update()
time.sleep(0)