summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-12-27 21:28:37 +0100
committeremkael <emkael@tlen.pl>2019-12-27 21:28:37 +0100
commitda515b8bbbd8b2d840920a6296f5d09f6c32414d (patch)
tree974176a1ad210f9804559a42c7217f00366d3082
parent7971511d859710929199b65b121d19eac8a9ac37 (diff)
Fetching GUI parent frame of specific type
-rw-r--r--jfr_playoff/gui/frames/__init__.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/jfr_playoff/gui/frames/__init__.py b/jfr_playoff/gui/frames/__init__.py
index cca19a5..97f55bf 100644
--- a/jfr_playoff/gui/frames/__init__.py
+++ b/jfr_playoff/gui/frames/__init__.py
@@ -153,14 +153,16 @@ class GuiFrame(tk.Frame):
def renderContent(self):
pass
-class RepeatableFrame(tk.Frame):
- def __init__(self, *args, **kwargs):
- tk.Frame.__init__(self, *args, **kwargs)
- self.renderContent()
+ def getSpecificParent(self, parentType):
+ obj = self
+ while not isinstance(obj, parentType):
+ obj = obj.master
+ if obj is None:
+ break
+ return obj
- def renderContent(self):
- pass
+class RepeatableFrame(GuiFrame):
def configureContent(self, **kwargs):
pass