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__.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 c046e53..a4cc361 100644
--- a/jfr_playoff/gui/frames/__init__.py
+++ b/jfr_playoff/gui/frames/__init__.py
@@ -3,6 +3,12 @@
import tkinter as tk
from tkinter import ttk
+def getIntVal(widget, default=0):
+ try:
+ return int(widget.get().strip())
+ except ValueError:
+ return default
+
class WidgetRepeater(tk.Frame):
def __init__(self, master, widgetClass, headers=None, *args, **kwargs):
if not issubclass(widgetClass, RepeatableFrame):