Your Ad Here

Posted By

buscarini on 07/18/06


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

yuconner
anayhk


Interfaz de grabación


 / Published in: Python
 

  1. from Tkinter import *
  2.  
  3. class App:
  4. def __init__(self,master):
  5.  
  6. frame = Frame(master)
  7. frame.pack()
  8.  
  9. self.button = Button(frame,text = "Quit",fg = "red", command=frame.quit)
  10. self.button.pack(side=LEFT)
  11.  
  12. self.hi_there = Button(frame,text="Start",command=self.start)
  13. self.hi_there.pack(side=LEFT)
  14.  
  15. self.hi_there = Button(frame,text="Stop",command=self.stop)
  16. self.hi_there.pack(side=LEFT)
  17.  
  18. self.archivo = StringVar()
  19. self.textField = Entry(frame,textvariable=self.archivo)
  20. self.textField.pack()
  21. self.hi_there.pack(side=RIGHT)
  22.  
  23.  
  24. def start(self):
  25. print("starting")
  26.  
  27. def stop(self):
  28. print("stopping")
  29.  
  30. root = Tk()
  31.  
  32. app = App(root)
  33.  
  34. root.mainloop()

Report this snippet  

You need to login to post a comment.