parameters: (self, value, max=None)
docstring: set(value) - Set progress bar position
docstring_summary: set(value) - Set progress bar position
docstring_tokens: set ( value ) - Set progress bar position
function: def set(self, value, max=None):
          """set(value) - Set progress bar position"""
          if max is not None:
              self.maxval = max
              bar = self.d.GetDialogItemAsControl(3)
              if max <= 0:    # indeterminate bar
                  bar.SetControlData(0,kControlProgressBarIndeterminateTag,'\x01')
              else:           # determinate bar
                  bar.SetControlData(0,kControlProgressBarIndeterminateTag,'\x00')
          if value < 0:
              value = 0
          elif value > self.maxval:
              value = self.maxval
          self.curval = value
          self._update(value)
function_tokens: def set ( self , value , max = None ) : if max is not None : self . maxval = max bar = self . d . GetDialogItemAsControl ( 3 ) if max <= 0 : # indeterminate bar bar . SetControlData ( 0 , kControlProgressBarIndeterminateTag , '\x01' ) else : # determinate bar bar . SetControlData ( 0 , kControlProgressBarIndeterminateTag , '\x00' ) if value < 0 : value = 0 elif value > self . maxval : value = self . maxval self . curval = value self . _update ( value )