4

I have been playing with using tkinter to make overlays so some information would appear on top of the rest of the screen.

I'd rather not have this window block the mouse. Is there any way I can have it so click events pass though my overlay? So the window below my tkinter app receives the event.

Bachmann
  • 748
  • 6
  • 12
  • I do not think you can do it. What I tried is 1. recieve event 2. minimize the window 3. send the mouse event again 4. open the window. but this did not work since minimizing takes some unknown time. You can try fleeing from the mouse so the mouse never enters. – User Oct 23 '13 at 16:29

3 Answers3

2

No, there is nothing built in to tkinter that would allow you to do that. The best that you could hope for is to capture an event, then use some sort of platform-specific tool that lets you create new events, and use the coordinates from the captured event to generate a new, non-tkinter event.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
  • Sigh, I was afraid of this. Thanks! Yeah, a hack I could do would be to move the window, simulate a mouse click, move the mouse back. But this requires pymouse which requires pyobjc which has its own headaches to install. – Bachmann Oct 23 '13 at 21:03
2

As the other answers stated, I don't think is is possible to do through Tkinter, however, you can use win32 to make the window able to be clicked-through. VRage answered it well in his comment to this post:

Tkinter see through window not affected by mouse clicks

Community
  • 1
  • 1
Caleb Hulbert
  • 145
  • 2
  • 11
1

One way to do this is build your own msg queue with a lightweight caller and scheduler to process msg and state of widget. This class or function is usually there without such name as queue manager because having back-end class is general-purpose item for application. Adding to simple event transfer queue could have this done which is what I am now doing.

BrainAtom
  • 29
  • 3