Search code examples
pythonwxpythontransparencytransparenttranslucency

How to create a translucid/alpha-transparent rectangle using wxpython?


I have a wx.panel and I want to put a translucid rectangle on a part of it.

How can I do that using wxpython?


Solution

  • You can do this using a wx.GraphicsContext, and there's a good example in the wxPython demo (located in the Miscellaneous category).