Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. from appJar import gui
  2.  
  3. def press(button):
  4. if button == "Cancel":
  5. app.stop()
  6. elif button == "Info":
  7. app.infoBox("Info", "Blablabla")
  8. print("Info")
  9. else:
  10. usr = app.getEntry("Username")
  11. pwd = app.getEntry("Password")
  12. print("User:", usr, "Pass:", pwd)
  13.  
  14. app = gui("Login Window", "1000x500")
  15. app.setFont(18)
  16.  
  17. app.addLabel("title", "Welcome to appJar")
  18. app.setLabelBg("title", "blue")
  19. app.setLabelFg("title", "orange")
  20.  
  21. app.addLabelEntry("Username")
  22. app.addLabelSecretEntry("Password")
  23.  
  24. app.addButtons(["Submit"], press)
  25. app.addVerticalSeparator(colour=None, row=0, column=1)
  26. app.addButtons(["Info"], press)
  27. app.addVerticalSeparator(colour=None, row=0, column=1)
  28. app.addButtons(["Cancel"], press)
  29.  
  30. app.setFocus("Username")
  31.  
  32. app.go()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement