Guest User

Untitled

a guest
May 4th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. global pwordE # These globals just make the variables global to the entire script, meaning any definition can use them
  2. global nameE
  3. global roots
  4.  
  5. roots = Tk() # This creates the window, just a blank one.
  6. roots.title('Signup') # This renames the title of said window to 'signup'
  7. intruction = Label(roots, text='Please Enter new Credidentials\n') # This puts a label, so just a piece of text saying 'please enter blah'
  8. intruction.grid(row=0, column=0, sticky=E) # This just puts it in the window, on row 0, col 0. If you want to learn more look up a tkinter tutorial :)
  9.  
  10. nameL = Label(roots, text='New Username: ') # This just does the same as above, instead with the text new username.
  11. pwordL = Label(roots, text='New Password: ') # ^^
  12. nameL.grid(row=1, column=0, sticky=W) # Same thing as the instruction var just on different rows. :) Tkinter is like that.
  13. pwordL.grid(row=2, column=0, sticky=W) # ^^
  14.  
  15. nameE = Entry(roots) # This now puts a text box waiting for input.
  16. pwordE = Entry(roots, show='*') # Same as above, yet 'show="*"' What this does is replace the text with *, like a password box :D
  17. nameE.grid(row=1, column=1) # You know what this does now :D
  18. pwordE.grid(row=2, column=1) # ^^
  19.  
  20. signupButton = Button(roots, text='Signup', command=FSSignup) # This creates the button with the text 'signup', when you click it, the command 'fssignup' will run. which is the def
  21. signupButton.grid(columnspan=2, sticky=W)
  22. roots.mainloop() # This just makes the window keep open, we will destroy it soon
Add Comment
Please, Sign In to add comment