I created a code using just functions. I am now putting the functions into classes.
I created the function:
def login()
login_button = Button(root, text="Click here to enter data: ",
command=lambda: validation(username_input_box.get(), password_input_box.get()))
login_button.place(x=210, y=240)
quit_button = Button(root, text="Quit", command=root.quit)
quit_button.place(x=265, y=300)
I have now put it in a class called "setup" (the class has other function):
class setup:
def login(self):
login_button = Button(root, text="Click here to enter data: ",
command=lambda: self.validation(username_input_box.get(), password_input_box.get()))
login_button.place(x=210, y=240)
quit_button = Button(root, text="Quit", command=root.quit)
quit_button.place(x=265, y=300)
I want to call the function login() from outside the class. I know normally you would just do login(), but It says "login" is not defined. Any idea on how to do this?
thanks x