Skip to content

Commit 7d54d36

Browse files
authored
Update node_menu.py
1 parent 77643e5 commit 7d54d36

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tknodesystem/node_menu.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def __init__(self, attach, button_color=None, height: int = 300, width: int = 25
2828
self.button_num = 0
2929
self.node = {}
3030
self.padding = 0
31+
self.focus_something = False
3132

3233
self.withdraw()
3334
if sys.platform.startswith("win"):
@@ -43,6 +44,7 @@ def __init__(self, attach, button_color=None, height: int = 300, width: int = 25
4344
self.transient(self.master)
4445
self.attach.bind("<Button-1>", lambda e: self._withdraw(), add="+")
4546
self.attach.bind("<Double-Button-2>", self.popup, add="+")
47+
self.focus_something = True
4648
else:
4749
self.attributes("-type", "splash")
4850
self.transparent_color = '#000001'
@@ -159,6 +161,7 @@ def _iconify(self, x=None, y=None):
159161
self.focus_set()
160162
self.search_entry.focus_set()
161163
self._deiconify()
164+
self.focus_something: self.node[0].focus_set()
162165
self.place_dropdown(x,y)
163166

164167
def _attach_key_press(self, command):

0 commit comments

Comments
 (0)