title: Need help writing "backgroundless" widget for wxWidgets (wxGTK) using GTK2
body: <p>My question is concerned with <strong>GTK2</strong> and <strong>wxWidgets</strong> (actually wxGTK).</p>
  
  <p>In <strong>wxGTK</strong> all controls have grey background by default and it is impossible to remove it. I have a textured panel with custom child controls and each of my controls has an ugly grey border which I can't remove. I can only set some background color and make the panel's color the same. So I need a <strong>kind of "backgroundless" control</strong> in wxGTK.</p>
  
  <p>I have many years of MS Windows experience before Linux. As far as I remember, in MS Windows each windowed control (i.e. widget) receives a <strong>WM_ERASEBKGND</strong> message (event) and then <strong>WM_PAINT</strong> message. The background is drawn in <strong>WM_ERASEBKGND</strong> event handler, so you can easily leave the parent control's background untouched and paint all of widget's elements on top of it by simply rewriting this handler.</p>
  
  <p>That's not the case with wxGTK (and GTK2)!</p>
  
  <p>Actually all widgets in wxGTK are based on custom "wxPizza" GTK widget, which is derived from GtkFixed widget. Any of wxPizza widgets has its own gdk window, so it is impossible to implement custom windowless widgets using standard wxGTK controls, based on "wxPizza" widget.</p>
  
  <p>So I decided to implement another one GTK2 widget to make "backgroundless" controls available to wxWidgets. I implemented a windowless GTK2 widget, derived from GtkFixed. To make it windowless I used <strong>gtk_widget_set_has_window</strong> function (another way is to set a <strong>GTK_NO_WINDOW</strong> flag).</p>
  
  <p>Everything works, except for draw coordinates, which are in parent window coordinate space. So the widget's elements are drawn at the parent window's top left position. That's the problem that I can't resolve. Maybe I need to add a GtkEventBox to my custom widget? </p>
  
  <p>Maybe there are another ways to implement such functionality (backgroundless widgets) in GTK2? What do you think about that?</p>
  
  <p>Thanks in advance,
  Ilya</p>