Guest User

Untitled

a guest
Dec 15th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. from tkinter import *
  2. import os
  3.  
  4. def adminLogin():
  5. global AnameEL
  6. global ApwordEL # More globals :D
  7. global ArootA
  8.  
  9. ArootA = Tk() # This now makes a new window.
  10. ArootA.geometry('1280x720')
  11. ArootA.title('Admin login') # This makes the window title 'login'
  12.  
  13. f1 = Frame(width=200, height=200, background="#D3D3D3")
  14. f2 = Frame(width=400, height=200, background="#b4b4b4")
  15.  
  16. f1.pack(fill="both", expand=True, padx=0, pady=0)
  17. f2.place(in_=f1, anchor="c", relx=.5, rely=.5)
  18.  
  19. AnameL = Label(ArootA, text='Username: ') # More labels
  20. ApwordL = Label(ArootA, text='Password: ') # ^
  21. AnameL.grid(row=1, sticky=W)
  22. ApwordL.grid(row=2, sticky=W)
  23.  
  24. AnameEL = Entry(ArootA) # The entry input
  25. ApwordEL = Entry(ArootA, show='*')
  26. AnameEL.grid(row=1, column=1)
  27. ApwordEL.grid(row=2, column=1)
  28.  
  29. AloginB = Button(ArootA, text='Login')
  30. AloginB.grid(columnspan=2, sticky=W)
  31.  
  32. adminLogin()
Add Comment
Please, Sign In to add comment