Fix focus when launched, something changed after Python 3.9.6.
Throwing everything at the wall here.
This commit is contained in:
parent
9d5ced0cea
commit
3260953a36
1 changed files with 4 additions and 1 deletions
5
PGUI.pyw
5
PGUI.pyw
|
|
@ -148,7 +148,8 @@ def main(argv):
|
|||
|
||||
pgui = PGUILauncher(root)
|
||||
pgui.pack(fill=tkinter.BOTH, expand=True)
|
||||
pgui.filter_entry.focus()
|
||||
pgui.filter_entry.focus_set()
|
||||
pgui.filter_entry.focus_force()
|
||||
|
||||
width = root.winfo_reqwidth()
|
||||
height = root.winfo_reqheight()
|
||||
|
|
@ -157,6 +158,8 @@ def main(argv):
|
|||
|
||||
root.geometry('%dx%d+%d+%d' % (width, height, x_offset, y_offset-50))
|
||||
root.deiconify()
|
||||
root.focus()
|
||||
root.after(100, lambda: pgui.filter_entry.focus_force())
|
||||
root.mainloop()
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Reference in a new issue