From dd422a26175030d66da927f5d97f35012764d56c Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 7 Jun 2019 18:09:49 +0200 Subject: Making dialogs modal --- jfr_playoff/gui/frames/__init__.py | 2 ++ jfr_playoff/gui/frames/team.py | 2 ++ 2 files changed, 4 insertions(+) (limited to 'jfr_playoff') diff --git a/jfr_playoff/gui/frames/__init__.py b/jfr_playoff/gui/frames/__init__.py index 7573ed4..9665663 100644 --- a/jfr_playoff/gui/frames/__init__.py +++ b/jfr_playoff/gui/frames/__init__.py @@ -67,6 +67,8 @@ class WidgetRepeater(tk.Frame): dialog = tk.Toplevel(self) dialog.title('Wybór elementu do dodania') dialog.geometry('%dx%d' % (300, len(self.widgetClass) * 20 + 30)) + dialog.grab_set() + dialog.focus_force() frame = WidgetSelectionFrame( dialog, vertical=True, widgets=self.widgetClass, callback=self._handleWidgetSelection) diff --git a/jfr_playoff/gui/frames/team.py b/jfr_playoff/gui/frames/team.py index 17636da..510d021 100644 --- a/jfr_playoff/gui/frames/team.py +++ b/jfr_playoff/gui/frames/team.py @@ -123,6 +123,8 @@ class TeamSelectionButton(ttk.Button): else: dialog = tk.Toplevel(self) dialog.title('Wybór teamów') + dialog.grab_set() + dialog.focus_force() selectionFrame = self.dialogclass( dialog, title=self.prompt, teams=teams, -- cgit v1.2.3