Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 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"], "row=2\ncolumn=0", press)
  25. app.addButtons(["Info"], "row=2\ncolumn=1", press)
  26. app.addButtons(["Cancel"], "row=2\ncolumn=2", press)
  27.  
  28. app.setFocus("Username")
  29.  
  30. app.go()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement