text - wxpython: StaticText on transparent background -
I am trying to create a subclass of wx.StaticText that does not have a background I tried to set the alpha component of background with SetBackgroundColor , or with no luck using SetTransparent on different objects, but maybe it only Because I'm a noobie :) Anyway, I ended up subclassing wx.StaticText , modify the OnPaint method Received to no background paint, and EVT_PAINT to force new method. It works very well most of the time (when the application starts or is repainted after it is hidden from any other window), but whenever I use SetLabel On a method of my subclass of method static text , this is not my OnPaint method that is said to refresh the window, and I default gray background Ends with. Below is a "small" work example, it shows the text with the background for the first time, wait 1.5 seconds, and then changes the label of the text, which also paints the background. (And does not call my homemade painting method). import wx, time c...