How do you set a buttons background colour to transparent, using tkinter on Ubuntu?
Or windows, I am able to set the -transparentcolor
attribute, but on Ubuntu it fails.
try:
self.wm_attributes("-transparentcolor", "grey")
self.wm_attributes("-topmost", 'true')
except Exception as e:
logger.error(e)
And then later when I defined my button, I set the background colour to be grey. When it renders, the buttons image is well defined and the entire background is transparent.
This works on Windows and the background of the button is transparent, but on Ubuntu it gives the error:
bad attribute "-transparentcolor": must be -alpha, -topmost, -fullscreen, or -type
And then i try and use alpha
like other answers have suggested, it does not change the button at all.
How would I set the buttons background image to be transparent?