diff options
author | emkael <emkael@tlen.pl> | 2019-06-02 22:22:52 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-06-02 22:22:52 +0200 |
commit | b53a4f555f8560de419924692b3c9017f4cc949c (patch) | |
tree | ec87aed54138506296b62c639082d31da39adc35 | |
parent | 5d3a03040b5d4b1fcd2bdf80f755e69edeea4f41 (diff) |
Value setter for widget repeater
-rw-r--r-- | jfr_playoff/gui/frames/__init__.py | 6 |
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) |