this is the part of the code in question, its a bit messy but what happens is when i run the code only button1 can be used. the other buttons turn up and can be clicked but nothing happens. any idea what going on? im pretty sure it has something to do with the bind part but i cant fix it, it looks fine to me but it doesnt work so... haha thanks in advance
##Buttons##
self.button1 = Button(self.canvays)
self.button1.configure(text="Pride", background="red")
self.button1.pack(side=RIGHT)
self.button1.focus_force()
self.button1.place(x=85, y=367)
self.button1.bind("<Button-1>", self.button1Click)
self.button2 = Button(self.canvays)
self.button2.configure(text="Murder", background="blue")
self.button2.pack(side=TOP)
self.button2.focus_force()
self.button2.place(x=225, y=367)
self.button2.bind("<Button-2>", self.button2Click)
self.button3 = Button(self.canvays)
self.button3.configure(text="Lions", background="Yellow")
self.button3.pack(side=TOP)
self.button3.focus_force()
self.button3.place(x=380, y=367)
self.button3.bind("<Button-3>", self.button3Click)
self.root.mainloop()
def incorrect(self):
self.labelincorrect = Label(text = "Sorry that wasnt right, try again")
self.labelincorrect.pack(side=TOP)
self.labelincorrect.place(x=250, y=250)
def correct(self):
self.score = self.score+1
##Button Event##
def button3Click(self, event):
self.incorrect()
def button2Click(self, event):
self.incorrect()
def button1Click(self, event):
self.root.destroy()
self.correct()
Question2()
button2, and right-click tobutton3? If you want normal behavior, you don't have to bind anything to buttons at all. They behave like buttons by default. Please see a tutorial on Tkinter for more info.