I want to make the word "CAT" into a button, so when it's clicked it says "CAT". Also, the button I want should be in the position that the word is right now when it's not a button. Any help provided is needed. Thank you
I have already tried the tkinter module, but the problem with that is it opens a separate window with the button. What I want is a button on the main screen.
import turtle
screen = turtle.Screen()
# this assures that the size of the screen will always be 400x400 ...
screen.setup(800,800)
turtle.ht()
turtle.penup()
turtle.goto (50, 200)
turtle.color("black")
turtle.write("CAT", move=False, align="center", font=("Times New Roman", 120, "bold"))
screen.bgpic("background.gif")
turtle.st()
turtle.forward(145)
turtle.left(90)
turtle.forward(10)
turtle.pendown()
turtle.forward(110)
turtle.left(90)
turtle.forward(287)
turtle.left(90)
turtle.forward(110)
turtle.left(90)
turtle.forward(287)
turtle.ht()
I expect the output to be a huge button (in black) at the top of the screen saying "CAT". When that button is pressed, I want it to say "CAT" out loud. Right now there is just text at the top saying "CAT". I want to replace that text with a button saying the same thing. If I use on screen click I want the click to be in specific coordinates. How would I do that. Thank You!