Posted By

stevennathaniel on 03/25/11


Tagged

time


Versions (?)

Counter2.py


 / Published in: Python
 

URL: http://stevennathaniel.blogspot.com/

cara membuat time counter menggunakan Python Megawidgets

  1. import Tkinter
  2. root = Tkinter.Tk()
  3. import Pmw
  4. Pmw.initialise(root)
  5.  
  6. counter2 = Pmw.Counter(datatype = 'time', increment = 60)
  7. counter2.configure(increment = 60*10) # Berguna untuk menambahan/mengurangi nilai menit sebanyak 10 menit
  8. counter2.setentry('00:00:00')
  9. counter2.pack(padx = 10, pady = 10)
  10.  
  11. root.mainloop()
  12.  
  13.  
  14. # http://twitter.com/bpptwiter
  15. # http://stevennathaniel.blogspot.com/

Report this snippet  

You need to login to post a comment.