I have a label and I want to do some actions on hover and click but the below code is not working.
class LoginForm:
def __init__(self,root):
Label(text='Don\'t have an account? Create one!', font='Arial 10').place(relx=0.5, rely=0.8, anchor=CENTER)
Label.bind( "<Button>",self.mouseClick)
def mouseClick(self,event):
print('x')
And I got the next error
AttributeError: 'str' object has no attribute '_bind'
Does anyone know how to fix this problem?