First of all, I know that there are tons of threads about this issue, but I have still made 0 progress on this, none of the solutions work. I even created a minimal example with 9 lines of code and doesnt matter what I do, the label text wont change:
root = tkinter.Tk()
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()
root.geometry("500x50" + "+" + str(screen_width - 520) + "+" + str(screen_height - 140))
root.title("POE Price Checker")
rootLabelHeader = tkinter.Label(root, text = "Currently searching:").pack()
labelText = tkinter.StringVar()
labelText.set("Nothing")
rootLabelInfo = tkinter.Label(root, text = labelText.get(), width=90).pack()
#rootLabelInfo.configure(text="New String") # Nope
#rootLabelInfo.config(text="New String") # Nope
labelText.set("Doesnt Work")
labelText.get()
#root.after(1000, ListenToInput)
root.mainloop()
First I have tried using StringVar
, but nothing happens, it never changes the text to "Doesnt Work", also no errors are shown.
Then I tried using:
rootLabelInfo.configure(text="New String")
rootLabelInfo.config(text="New String")
Both give me NoneType object has no attribute config
.