def start_cas(self):
# add log in pop up here to let the user to input the username and password. Save then in cas_usr and cas_pw
self.login_window = Tkinter.Toplevel(root)
self.login_window.title('Cassandra Log in')
self.login_window.lift()
x = self.frame3.winfo_rootx()
y = self.frame3.winfo_rooty()
self.login_window.geometry('300x170+%d+%d' % (x+150, y+100))
self.login_window.rowconfigure(0, weight=1)
self.login_window.rowconfigure(1, weight=1)
self.login_window.rowconfigure(2, weight=1)
self.login_window.rowconfigure(3, weight=1)
self.login_window.rowconfigure(4, weight=1)
self.login_window.columnconfigure(0, weight=1)
self.login_window.columnconfigure(1, weight=1)
self.login_window.columnconfigure(2, weight=1)
self.login_window.columnconfigure(3, weight=1)
self.login_window.resizable(False, False)
unlabel = ttk.Label(self.login_window, text='Username:')
unlabel.grid(row=1, column=1)
pwlabel = ttk.Label(self.login_window, text='Password:')
pwlabel.grid(row=2, column=1)
self.username_cas = Tkinter.StringVar()
self.password_cas = Tkinter.StringVar()
unentry = ttk.Entry(self.login_window, textvariable=self.username_cas, width=20)
unentry.focus_set()
unentry.grid(row=1, column=2)
pwentry = ttk.Entry(self.login_window, textvariable=self.password_cas, width=20)
pwentry.grid(row=2, column=2)
pwentry.configure(show='*')
conf_but = ttk.Button(self.login_window, text='Confirm', command=self.checkuser)
conf_but.grid(row=3, column=2, sticky='e')
self.login_window.bind('<Return>', self.shortcut2)
评论列表
文章目录