Im new and need help thanks /u/Budget-Abalone-3886 Python Education

from tkinter import * Myvar = "You Clicked Me" Word = "Click Me!" def click(): global Word print(Myvar) Word = "You Clicked Me" window = Tk() photo = PhotoImage(file='did-not-mean-it.gif') button = Button(window, text=Word, command=click, font=("Comic Sans", 30), fg="#00FF00", bg="blue", activeforeground="#00FF00", activebackground="blue", image=photo, compound='bottom' ) button.pack() window.mainloop() 

Thats my my code for a button with text and a image I would like the button to say “Click Me!” then when you click it say “You Clicked Me” but it just doesnt change the variable Myvar which ends up countinuing to print “Click Me!”

submitted by /u/Budget-Abalone-3886
[link] [comments]

​r/learnpython from tkinter import * Myvar = “You Clicked Me” Word = “Click Me!” def click(): global Word print(Myvar) Word = “You Clicked Me” window = Tk() photo = PhotoImage(file=’did-not-mean-it.gif’) button = Button(window, text=Word, command=click, font=(“Comic Sans”, 30), fg=”#00FF00″, bg=”blue”, activeforeground=”#00FF00″, activebackground=”blue”, image=photo, compound=’bottom’ ) button.pack() window.mainloop() Thats my my code for a button with text and a image I would like the button to say “Click Me!” then when you click it say “You Clicked Me” but it just doesnt change the variable Myvar which ends up countinuing to print “Click Me!” submitted by /u/Budget-Abalone-3886 [link] [comments] 

from tkinter import * Myvar = "You Clicked Me" Word = "Click Me!" def click(): global Word print(Myvar) Word = "You Clicked Me" window = Tk() photo = PhotoImage(file='did-not-mean-it.gif') button = Button(window, text=Word, command=click, font=("Comic Sans", 30), fg="#00FF00", bg="blue", activeforeground="#00FF00", activebackground="blue", image=photo, compound='bottom' ) button.pack() window.mainloop() 

Thats my my code for a button with text and a image I would like the button to say “Click Me!” then when you click it say “You Clicked Me” but it just doesnt change the variable Myvar which ends up countinuing to print “Click Me!”

submitted by /u/Budget-Abalone-3886
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *