SHARE
TWEET

Untitled

a guest Jun 17th, 2019 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. top.geometry("676x450+458+150")
  2.     top.title("Some title here")
  3.     top.configure(background="#d9d9d9")
  4.     top.configure(highlightbackground="#d9d9d9")
  5.     top.configure(highlightcolor="black")
  6.  
  7.     username = StringVar()
  8.     password = StringVar()
  9.  
  10.     def user_login():
  11.         if len(username.get()) != 0 and len(password.get()) != 0:
  12.             result = backend.log(username.get())
  13.             if not result:
  14.                 self.messageBox.delete('1.0', END)
  15.                 self.messageBox.insert(END, 'Invalid Login')
  16.             else:
  17.                 level = result[0]
  18.                 user_name = result[1]
  19.                 pass_word = result[2]
  20.                 if user_name == username.get() and pass_word == password.get():
  21.                     new_window()
  22.                 else:
  23.                     self.messageBox.delete('1.0', END)
  24.                     self.messageBox.insert(END, 'Invalid Login')
  25.  
  26.         else:
  27.             self.messageBox.delete('1.0', END)
  28.             self.messageBox.insert(END, 'Username and Password required')
  29.  
  30.     # This function opens the window created in Class HomePage
  31.     def new_window():
  32.         self.newWindow = Toplevel(self.top)
  33.         login = HomePage(self.newWindow)
  34.      
  35. top.geometry("903x568+392+150")
  36.     top.title("Some title here")
  37.     top.configure(background="#d9d9d9")
  38.     top.configure(highlightbackground="#d9d9d9")
  39.     top.configure(highlightcolor="black")
  40.  
  41.     self.linksFrame = Frame(top)
  42.     self.linksFrame.place(relx=0.035, rely=0.052, relheight=0.875
  43.                           , relwidth=0.272)
  44.     self.linksFrame.configure(relief='groove')
  45.     self.linksFrame.configure(borderwidth="2")
  46.     self.linksFrame.configure(relief='groove')
  47.     self.linksFrame.configure(background="#d9d9d9")
  48.     self.linksFrame.configure(highlightbackground="#d9d9d9")
  49.     self.linksFrame.configure(highlightcolor="black")
  50.     self.linksFrame.configure(width=235)
  51.  
  52.     # Then I want to be able to say here that:
  53.     self.registerPat = Button(self.linksFrame)
  54.     self.registerPat.place(relx=0.043, rely=0.079, height=34, width=217)
  55.     self.registerPat.configure(activebackground="#ececec")
  56.     self.registerPat.configure(activeforeground="#000000")
  57.     self.registerPat.configure(background="#d9d9d9")
  58.     self.registerPat.configure(disabledforeground="#a3a3a3")
  59.     self.registerPat.configure(foreground="#000000")
  60.     self.registerPat.configure(highlightbackground="#d9d9d9")
  61.     self.registerPat.configure(highlightcolor="black")
  62.     self.registerPat.configure(pady="0")
  63.     self.registerPat.configure(relief='groove')
  64.     self.registerPat.configure(text='''Register Patient''')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top