MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / Update

Method Update

PySimpleGUI/PySimpleGUI.py:4666–4685  ·  view source on GitHub ↗

Update the current value of the bar and/or update the maximum value the bar can reach :param count: current value :type count: (int) :param max: the maximum value :type max: (int)

(self, count=None, max=None)

Source from the content-addressed store, hash-verified

4664 self.TKProgressBarForReal = ttk.Progressbar(root, maximum=self.Max, style=self.style_name, length=length, orient=tk.VERTICAL, mode='determinate')
4665
4666 def Update(self, count=None, max=None):
4667 """
4668 Update the current value of the bar and/or update the maximum value the bar can reach
4669 :param count: current value
4670 :type count: (int)
4671 :param max: the maximum value
4672 :type max: (int)
4673 """
4674 if max is not None:
4675 self.Max = max
4676 try:
4677 self.TKProgressBarForReal.config(maximum=max)
4678 except:
4679 return False
4680 if count is not None:
4681 try:
4682 self.TKProgressBarForReal['value'] = count
4683 except:
4684 return False
4685 return True
4686
4687
4688# ---------------------------------------------------------------------- #

Callers 11

update_clockMethod · 0.80
update_weatherMethod · 0.80
update_barMethod · 0.80
updateMethod · 0.80
fill_form_with_valuesFunction · 0.80
UpdateMeterMethod · 0.80
_choose_auto_watchesMethod · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected