I have some ttk buttons but they're inside a function and whenever I try to style it it doesn't work but when I create a new file and use same lines but without putting it inside functions it works just fine. Here's the snippet of code.
def function():
if Something == Another thing:
r = Tk() # Opens new window
r.title('Lorem ipsum')
s = ttk.Style()
s.configure('TButton', font=('Helvetica', 18))
Button = ttk.Button(r, text = "lorem ipsum dolor sit amet",command = lorem ipsum,style="TButton")
Label = ttk.Label(r, text = "Get total Stores Values and quantities")
Label.place(relx = 0.2, rely= 0.4,anchor=CENTER)
Button.place(relx = 0.5, rely= 0.4 ,width= 500 ,height = 50 ,anchor=CENTER)
Thanks and hope it's clear enough.