How to create progress bar?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maximus tee
    New Member
    • Dec 2010
    • 30

    How to create progress bar?

    hi,

    i'm using python 2.5 and am creating a GUI with a Reset button that will reset in 30s. When i click on the reset button it will show a progress bar. Pls advise.

    thanks
    maximus
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Off the top of my head (thinking Tkinter) - try creating a filled rectangle on a canvas that updates each time increment.

    Comment

    • maximus tee
      New Member
      • Dec 2010
      • 30

      #3
      thanks. i manage to find a way by using EasyDialog.
      any comment on using EasyDialogs? is EasyDialog public license?
      example:
      Code:
      import EasyDialogs
      
          meter = EasyDialogs.ProgressBar('Time Delay 30s...',
                                      maxval=30,
                                      label='Starting',
                                      )
          for i in xrange(1, 31):
              phase = 'Time Elapse %ds' % i
              #print phase
              meter.label(phase)
              meter.inc()
              time.sleep(1)
          
          del meter
          time.sleep(1)
      Last edited by bvdet; Jan 6 '11, 01:47 AM. Reason: Add code tags

      Comment

      • bvdet
        Recognized Expert Specialist
        • Oct 2006
        • 2851

        #4
        Thanks for the post, maximus tee. I didn't know EasyDialogs existed. I found out it is distributed with Python on Macs. There is a windows version available here, covered by the MIT license.

        Comment

        • maximus tee
          New Member
          • Dec 2010
          • 30

          #5
          i also found there is easyGUI (http://easygui.sourceforge.net/)
          i havent try it out yet but soon.

          thanks
          maximus

          Comment

          Working...