Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. from Tkinter import *
  2.  
  3.  
  4. class tk_hello(object):
  5. def __init__(self, question):
  6. self.question = question
  7. self.master = Tk()
  8. self.lbl = Label(self.master, text="Did it work?")
  9. self.lbl.pack()
  10. self.btn = Button(self.master, text="Yes", command=self.yes_command)
  11. self.btn.pack()
  12. self.master.mainloop()
  13.  
  14. def yes_command(self):
  15. print("User pressed Yes")
  16. self.master.quit()
  17. self.master.destroy()
  18.  
  19. *** Settings ***
  20.  
  21. *** Variables ***
  22.  
  23. *** Test Cases ***
  24. Example_1
  25. Import Library ${CURDIR}\..\work_project\tk_hello.py "Worked" WITH NAME Try_This
  26. Log To Console r ${CURDIR}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement