CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

I have problems with ctktoplevel and focus

Open Lart99 opened this issue 1 year ago • 2 comments

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.

Lart99 avatar Jan 21 '24 21:01 Lart99

Try this:

def topmost(window):
    window.attributes('-topmost', 1)
    window.attributes('-topmost', 0)

toplevel.after(200, lambda: topmost(toplevel))

Akascape avatar Jan 22 '24 07:01 Akascape

had the exact same problem, seems to be something with windows 11 23h2, but that fixed it!

coffandro avatar Feb 19 '24 08:02 coffandro