Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tkinter as tk
- class loginForm(tk.Tk):
- def __init__(self):
- tk.Tk.__init__(self)
- self.title('Login')
- self.geometry('170x110')
- self.userLabel = tk.Label(text='Username:')
- self.userLabel.grid(row=0, column=0)
- self.passwordLabel = tk.Label(text='Password:')
- self.passwordLabel.grid(row=1, column=0)
- self.userEntry = tk.Entry()
- self.userEntry.grid(row=0, column=1)
- self.passwordEntry = tk.Entry(show='*')
- self.passwordEntry.grid(row=1, column=1)
- self.submitentries = tk.Button(text='Submit', command=self.getInfo).grid(row=2, column=0)
- def getInfo(self):
- userGet = self.userEntry.get()
- passGet = self.passwordEntry.get()
- top = loginForm()
- top.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement