+
+ Under wxGTK and wxOSX, you can use ::wxBG_STYLE_TRANSPARENT to obtain
+ full transparency of the window background. Note that wxGTK supports
+ this only since GTK 2.12 with a compositing manager enabled, call
+ IsTransparentBackgroundSupported() to check whether this is the case.
+
+ Also, on order for @c SetBackgroundStyle(wxBG_STYLE_TRANSPARENT) to
+ work, it must be called before Create(). If you're using your own
+ wxWindow-derived class you should write your code in the following way:
+ @code
+ class MyWidget : public wxWindow
+ {
+ public:
+ MyWidget(wxWindow* parent, ...)
+ : wxWindow() // Use default ctor here!
+ {
+ // Do this first:
+ SetBackgroundStyle(wxBG_STYLE_TRANSPARENT);
+
+ // And really create the window afterwards:
+ Create(parent, ...);
+ }
+ };
+ @endcode
+