开发者

Way to make Tkinter button the same colour as its window?

开发者 https://www.devze.com 2023-03-26 22:00 出处:网络
So say i had a picture as the Tkinter window background and i had button on the window . Could i have the buttons the same coulor as the spot on the picture that the button is currently on? 开发者_运维

So say i had a picture as the Tkinter window background and i had button on the window . Could i have the buttons the same coulor as the spot on the picture that the button is currently on? 开发者_运维知识库So in someway make the buttons clear.


If you don't mind non-native buttons, you can make a transparent button image and save it as a PNG. Then use PIL to display it (in a canvas). This method requires you to manually program the button callbacks (e.g. changing the button image to a depressed one when the button is pressed).


No, tkinter doesn't support transparency at the individual widget level.

0

精彩评论

暂无评论...
验证码 换一张
取 消