Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 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.     else:
  9.         usr = app.getEntry("Username")
  10.         pwd = app.getEntry("Password")
  11.         print("User:", usr, "Pass:", pwd)
  12.  
  13. app = gui("Login Window", "400x200")
  14. app.setBg("orange")
  15. app.setFont(18)
  16.  
  17.  
  18. app.addLabel("title", "Welcome to appJar")
  19. app.setLabelBg("title", "blue")
  20. app.setLabelFg("title", "orange")
  21.  
  22. app.addLabelEntry("Username")
  23. app.addLabelSecretEntry("Password")
  24.  
  25. app.addButtons(["Submit", "Info", "Cancel"], press)
  26.  
  27. app.setFocus("Username")
  28.  
  29. app.go()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement