Posted By

stevennathaniel on 03/25/11


Tagged

basic


Versions (?)

Counter.py


 / Published in: Python
 

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

cara membuat counter dengan menggunakan Python Megawidgets. ini adalah bentuk yg paling dasar.

  1. import Tkinter
  2. root = Tkinter.Tk()
  3. import Pmw
  4. Pmw.initialise(root)
  5.  
  6. counter1 = Pmw.Counter(increment = 2)
  7. counter1.pack(padx = 10, pady = 10)
  8. counter1.setentry(50)
  9.  
  10. root.mainloop()
  11.  
  12.  
  13. # http://twitter.com/bpptwiter
  14. # http://stevennathaniel.blogspot.com/

Report this snippet  

You need to login to post a comment.