In my overall project, I am running code very similar to the code below. I am trying to display some text upon a button press. In my overall project, when I click the button, new text renders but it is overlapping the old text rather than deleting the old text and then rendering the new.
How can I display and update text free of overlap upon button press?
My code below after EDIT -> jokeTextBox.config is undefined
class Joke(tk.Frame):
def __init__(self, parent, controller):
tk.Frame.__init__(self, parent, background="#3a4466")
jokeTextBox = ttk.Label(self, background="red", foreground="white", )
jokeTextBox.place(x=250, y=150)
def jokeMode(self):
global jokeCount
text = aJokeFunction()
jokeTextBox.config(text=text,bg="red", fg="white")