Custom DirectButton shapes

Is there a way I can apply an image that is not perfectly square/rectangular to a Directbutton (for example - a circle or a square with rounded edges) and have it show that way in my scene.

I know I can create an egg and try to use the geom method, but was just wondering if there’s a parameter to get the image (which has alpha in it) to allow parts of the backgroudn to show through (like layers).

Hope the question makes sense.

Yes, that’s the way images display by default. However, you will also need to set relief = None to the DirectButton constructor, so that it does not display an opaque gray card behind your image.


I also use this parameter to not display an opaque gray card behind my image with a DirectButton. However, it doesn’t work with a directCheckButton.
I tried to set boxRelief = None but nothing change, I always have the gray background and my image is a cercle.

Is there a particular parameter for it ?

Try indicator_relief = None.