when you want to make a window and its elements clickthrough-able one will probably use code like that:
label = Label(root)
hwnd = label.winfo_id()
styles = win32gui.GetWindowLong(hwnd, win32con.GWL_EXSTYLE)
styles = win32con.WS_EX_LAYERED | win32con.WS_EX_TRANSPARENT
win32gui.SetWindowLong(hwnd, win32con.GWL_EXSTYLE, styles)
win32gui.SetLayeredWindowAttributes(hwnd, 0, 255, win32con.LWA_ALPHA)
Note: you need to use the handle of the elements (here: label) and not the handle of the window (here: root) assuming background of Window is alredy transparent:
root.config(bg='#000000')
root.attributes('-transparentcolor', '#000000')
Now the Question: how do I revoke the clickthrough? I assume its something like:
def revoke_click_through(hwnd):
... #maybe work with new styles?
win32gui.SetWindowLong(hwnd, ... )
win32gui.SetLayeredWindowAttributes(hwnd, ... )