Replies: 2 comments 3 replies
-
Trying to use this to make shadows around buttons and frames, but it results in black pixels around the corners. If there's a better way to do this, please let me know. Thanks! Code:
|
Beta Was this translation helpful? Give feedback.
3 replies
-
pywinstyles.set_opacity(frame1, value=0.5, color="#1") this method is not working |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Customtkinter widgets are square in shape because it uses tk canvas, the corner_radius and bg_color are camouflaged with the background in such a way that it looks like a rounded widget. But in reality, it is a method just to hide the corners, which doesn't work for overlapping widgets. Hence, was an issue with customtkinter.
However, I found the way to fix this. (ONLY FOR WINDOWS)
First, install this special package called pywinstyles (pip install pywinstyles)
You can even set opacity (partial transparency) in individual widgets like this:
(This thing is not available in tkinter by default, exclusively made for tk/ctk)
So, this is one more advanced step to take customtkinter to the next level.
Beta Was this translation helpful? Give feedback.
All reactions