button image transparent

hi,

Is it possiblt to load a transparent image in a DirectButton.
I am using png format but I got black box instead of transparency.

I read from here panda3d.org/manual/index.php/OnscreenImage about the self.myImage.setTransparency(TransparencyAttrib.MAlpha)

Is it possible to apply something similar to the image of a button?

thanks

Yes, setTransparency works on a DirectButton. You also need to pass relief = None to the DirectButton constructor.

David

also, don’t forget the import…

(spoken from experience)