Tkinter Wiki   ProgressDialog UserPreferences
 
HelpContents FindPage Diffs Info Edit Subscribe XML Print View

The PmwContribD ProgressDialog widget is a Pmw style dialog for showing the progress being made on a task. You can display the results either in a rectangular progress bar style, or in a circular progress dial style; see below for examples.

Excerpt from ProgressDialog.py:

  1 
  2 
  3 
  4 
  5 
  6 
  7 
  8 
  9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
        def startDial(self):
            dlg = ProgressDialog(self.interior(), metertype=ProgressMeter.ProgressDial,
                                meter_labelpos='w',
                                meter_label_text='Dial Example',
                                title='Dial Test',
                                command=self.dialCB,
                                )
            meter = dlg.component('meter')
            self.currentDialDlg = dlg
            for step, max in (
                ('Step 1', 100),
                ('Step 2', 1000),
                ('Step 3', 283),
                ):
                    meter.updateMessage(step)
                    meter.configure(finishvalue=max)
                    for i in range(max+1):
                        meter.updateProgress(i)

Screenshot of progress bar style:

ProgressDialog1.png

Screenshot of progress dial style:

ProgressDialog2.png

PythonPowered