Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- top.geometry("676x450+458+150")
- top.title("Some title here")
- top.configure(background="#d9d9d9")
- top.configure(highlightbackground="#d9d9d9")
- top.configure(highlightcolor="black")
- username = StringVar()
- password = StringVar()
- def user_login():
- if len(username.get()) != 0 and len(password.get()) != 0:
- result = backend.log(username.get())
- if not result:
- self.messageBox.delete('1.0', END)
- self.messageBox.insert(END, 'Invalid Login')
- else:
- level = result[0]
- user_name = result[1]
- pass_word = result[2]
- if user_name == username.get() and pass_word == password.get():
- new_window()
- else:
- self.messageBox.delete('1.0', END)
- self.messageBox.insert(END, 'Invalid Login')
- else:
- self.messageBox.delete('1.0', END)
- self.messageBox.insert(END, 'Username and Password required')
- # This function opens the window created in Class HomePage
- def new_window():
- self.newWindow = Toplevel(self.top)
- login = HomePage(self.newWindow)
- top.geometry("903x568+392+150")
- top.title("Some title here")
- top.configure(background="#d9d9d9")
- top.configure(highlightbackground="#d9d9d9")
- top.configure(highlightcolor="black")
- self.linksFrame = Frame(top)
- self.linksFrame.place(relx=0.035, rely=0.052, relheight=0.875
- , relwidth=0.272)
- self.linksFrame.configure(relief='groove')
- self.linksFrame.configure(borderwidth="2")
- self.linksFrame.configure(relief='groove')
- self.linksFrame.configure(background="#d9d9d9")
- self.linksFrame.configure(highlightbackground="#d9d9d9")
- self.linksFrame.configure(highlightcolor="black")
- self.linksFrame.configure(width=235)
- # Then I want to be able to say here that:
- self.registerPat = Button(self.linksFrame)
- self.registerPat.place(relx=0.043, rely=0.079, height=34, width=217)
- self.registerPat.configure(activebackground="#ececec")
- self.registerPat.configure(activeforeground="#000000")
- self.registerPat.configure(background="#d9d9d9")
- self.registerPat.configure(disabledforeground="#a3a3a3")
- self.registerPat.configure(foreground="#000000")
- self.registerPat.configure(highlightbackground="#d9d9d9")
- self.registerPat.configure(highlightcolor="black")
- self.registerPat.configure(pady="0")
- self.registerPat.configure(relief='groove')
- self.registerPat.configure(text='''Register Patient''')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement