Learn Before
Concept
Getting User Input using Entry Widget
We use the .Entry() widget to get single line user input. For multiline, we can use Text widget.
We can add a Label before Entry widget to let the user know, what the input is for.
label = tk.Label(text="Email:") label.pack() entry_email = tk.Entry() entry_email.pack() label = tk.Label(text="Password:") label.pack() entry_password = tk.Entry() entry_password.pack() button = tk.Button(text="Login", foreground="red") button.pack()

0
1
Updated 2021-08-17
Tags
Python Programming Language
Data Science