mirror of
https://github.com/norohind/EDMC_SpanshRouter.git
synced 2025-04-21 19:47:36 +03:00
Properly handle FocusOut events
This commit is contained in:
parent
5b5cdf3cd8
commit
4461854e39
@ -30,14 +30,17 @@ class AutoCompleter(Entry, PlaceHolder):
|
||||
self.bind('<Control-KeyRelease-a>', self.select_all)
|
||||
self.bind('<Button-3>', self.paste)
|
||||
self.lb.bind("<Double-Button-1>", self.selection)
|
||||
self.lb.bind("<<ListboxSelect>>", self.testing)
|
||||
self.bind("<FocusOut>", self.ac_foc_out)
|
||||
self.lb.bind("<FocusOut>", self.ac_foc_out)
|
||||
|
||||
self.update_me()
|
||||
|
||||
def ac_foc_out(self, event):
|
||||
self.foc_out()
|
||||
self.hide_list()
|
||||
x,y = self.parent.winfo_pointerxy()
|
||||
widget_under_cursor = self.parent.winfo_containing(x,y)
|
||||
if widget_under_cursor != self.lb and widget_under_cursor != self:
|
||||
self.foc_out()
|
||||
self.hide_list()
|
||||
|
||||
def paste(self, event):
|
||||
self.foc_in()
|
||||
|
Loading…
x
Reference in New Issue
Block a user