CustomTkinter
CustomTkinter copied to clipboard
I have problems with ctktoplevel and focus
I don't know if it's just me but I have problems with ctktoplevel and focus. When starting a window with ctktoplevel it starts in front of the main window and in a millisecond it goes behind the main window. This is fixed if I use wm_overrideredirect to remove the frame.
Try this:
def topmost(window):
window.attributes('-topmost', 1)
window.attributes('-topmost', 0)
toplevel.after(200, lambda: topmost(toplevel))
had the exact same problem, seems to be something with windows 11 23h2, but that fixed it!