summaryrefslogtreecommitdiff
path: root/jfr_playoff/gui/frames/__init__.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-06-02 22:22:52 +0200
committeremkael <emkael@tlen.pl>2019-06-02 22:22:52 +0200
commitb53a4f555f8560de419924692b3c9017f4cc949c (patch)
treeec87aed54138506296b62c639082d31da39adc35 /jfr_playoff/gui/frames/__init__.py
parent5d3a03040b5d4b1fcd2bdf80f755e69edeea4f41 (diff)
Value setter for widget repeater
Diffstat (limited to 'jfr_playoff/gui/frames/__init__.py')
-rw-r--r--jfr_playoff/gui/frames/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/jfr_playoff/gui/frames/__init__.py b/jfr_playoff/gui/frames/__init__.py
index 82f2966..5de9752 100644
--- a/jfr_playoff/gui/frames/__init__.py
+++ b/jfr_playoff/gui/frames/__init__.py
@@ -80,6 +80,12 @@ class WidgetRepeater(tk.Frame):
return [widget.getValue() for widget in self.widgets
if isinstance(widget, self.widgetClass)]
+ def setValue(self, value):
+ for i in range(0, len(value)):
+ if i >= len(self.widgets):
+ self._addWidget()
+ self.widgets[i].setValue(value[i])
+
class RepeatableFrame(tk.Frame):
def __init__(self, *args, **kwargs):
tk.Frame.__init__(self, *args, **kwargs)