Hello! I learned python a month ago. I would like to make a login program for practice (GUI). I got to the point where I did the buttons and stuff. But when I wanted to make it so that if there is nothing entered for the username or password, then it is not possible to continue. But it didn't work :(
I tried to do it in the command of the button:
The codes for the button:
https://paste.gg/p/Leventeand1/f5c8e8776...fcf802a131
I tried to do it in the command of the button:
def state(): if username == None: button.config(state=DISABLED)This didn't work...
The codes for the button:
button = Button(username_frame, text="Login", command=login) button.grid(row=2, column=0)My whole code:
https://paste.gg/p/Leventeand1/f5c8e8776...fcf802a131
Larz60+ write Feb-06-2023, 01:56 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
You can post your entire code within python tags, links may be ignored by many users. (added for you above this time). Please use these tags in future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
You can post your entire code within python tags, links may be ignored by many users. (added for you above this time). Please use these tags in future posts.