summaryrefslogtreecommitdiff
path: root/jfr_playoff/gui
diff options
context:
space:
mode:
Diffstat (limited to 'jfr_playoff/gui')
-rw-r--r--jfr_playoff/gui/frames/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/jfr_playoff/gui/frames/__init__.py b/jfr_playoff/gui/frames/__init__.py
index 4d8ad13..dd4f632 100644
--- a/jfr_playoff/gui/frames/__init__.py
+++ b/jfr_playoff/gui/frames/__init__.py
@@ -48,10 +48,12 @@ class WidgetRepeater(tk.Frame):
return None
def _createWidget(self, widgetClass, widgetClassParams=None):
+ headeridx = int(self.headerFrame is not None)
removeButton = ttk.Button(
self, text='[-]', width=5,
command=lambda i=len(self.widgets): self._removeWidget(i))
- removeButton.grid(row=len(self.widgets), column=0, sticky=tk.N)
+ removeButton.grid(
+ row=len(self.widgets)+headeridx, column=0, sticky=tk.N)
widget = widgetClass(self)
if widgetClassParams is not None:
widget.configureContent(**widgetClassParams)
@@ -96,7 +98,8 @@ class WidgetRepeater(tk.Frame):
if self.headerFrame is not None:
self.headerFrame.grid(row=0, column=1, sticky=tk.W+tk.E+tk.N+tk.S)
self.addButton.grid(
- row=len(self.widgets), column=0, columnspan=1, sticky=tk.W+tk.N)
+ row=len(self.widgets)+headeridx, column=0, columnspan=1,
+ sticky=tk.W+tk.N)
def _renderHeader(self):
if self.headers: