简体   繁体   中英

Transparent canvas in tkinter python

I need to have the canvas to be transparent and sit in front of buttons, labels ect (Making the idea of just using a canvas background impracticable). So when the user draws stuff, it will appear over all of the widgets.

At this point it's being clear that this may be impossible. So given the problem I have can someone either suggest a library, or maybe I missed something?

Cheers.

Making the Canvas transparent is not possible (as already said here ) but you can try with wxPython .

Otherwise, I suggest that you create two canvases: one with the widgets and one with a background image that fakes the widgets. Then you could just show the frame that you want to use and hide the other (using the option state=HIDDEN). But that would make the widgets unusable while you are drawing. I can't come up with a better solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM