mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
fixed window closing returning None of CTkInputDialog
This commit is contained in:
parent
156a1863f5
commit
ec8cecb575
@ -42,6 +42,8 @@ class CTkInputDialog:
|
||||
self.top.focus_force()
|
||||
self.top.grab_set()
|
||||
|
||||
self.top.protocol("WM_DELETE_WINDOW", self.on_closing)
|
||||
|
||||
self.top.after(10, self.create_widgets) # create widgets with slight delay, to avoid white flickering of background
|
||||
|
||||
def create_widgets(self):
|
||||
@ -95,6 +97,9 @@ class CTkInputDialog:
|
||||
self.user_input = self.entry.get()
|
||||
self.running = False
|
||||
|
||||
def on_closing(self):
|
||||
self.running = False
|
||||
|
||||
def cancel_event(self):
|
||||
self.running = False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user