Replies: 6 comments 4 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.
-
pywinstyles.set_opacity(frame1, value=0.5, color="#1") this method is not working |
Beta Was this translation helpful? Give feedback.
-
I LITERALLY HAVE THIS PROBLEM FOR AGES.. doing such things as set the bg_color='transparet', background_corner_colors, even try to manipulate it by giving it another frame and border such stuff but it just doesn't work. Thank you so much for providing this solution! |
Beta Was this translation helpful? Give feedback.
-
En CTk py como hago que la ventana abra maximizada |
Beta Was this translation helpful? Give feedback.
-
I started studying the customtkinter module, but I never joined the community on git. So, I always tried to eliminate the "background" of the widget and I couldn't, so thank you for finding a way around it. Well, I don't like to copy codes but I'll use yours as a base to create my own code to eliminate the "backgrownd" of the widgets! |
Beta Was this translation helpful? Give feedback.
-
thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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, it is still an issue with customtkinter.
However, I found the way to fix this. (ONLY WORKS FOR WINDOWS)
First, install this special package called pywinstyles (pip install pywinstyles)
Then simply use this line for the widget: pywinstyles.set_opacity(widget_var, color=bg_color)
Example:
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