soapergem
soapergem

Reputation: 10029

Is it possible to make text translucent in wxPython?

I am adding some wx.StaticText objects on top of my main wx.Frame, which already has a background image applied. However, the StaticText always seems to draw with a solid (opaque) background color, hiding the image. I have tried creating a wx.Color object and changing the alpha value there, but that yields no results. Is there any way I can put text on the frame and have the background shine through? And furthermore, is it possible to make the text itself translucent? Thanks.

Upvotes: 1

Views: 505

Answers (2)

Jim Carroll
Jim Carroll

Reputation: 2330

I would try aggdraw into a small canvas.

Any Static Text uses the platform's native label machinery, so you don't get that sort of control over it.

Upvotes: 0

sastanin
sastanin

Reputation: 41551

You probably need some graphics rendering widget. As far as I know, in wxPython you can use either built-in wxGraphicsContext or pyCairo directly. Cairo is more powerful. However, I don't know the details.

Upvotes: 1

Related Questions