I have a project in Python 2.7 and PyGTK.
I need to create a transparent background window, but still be able to display images (pixmap and mask based) and other objects inside the window.
I use the following code, but image objects are not displayed in Ubuntu (Oneric Ocelot), and I get the error message posted below (although otherwise the window displays buttons with its objects). This will not even appear on Windows 7 (this error is also listed below).
def expose(widget, event): cr = widget.window.cairo_create()
WINDOWS 7 RUN:
Traceback (last last call): File "C: \ Users \ user \ MousePaw Games \ Word4Word \ PYM \ fishtest2.py", line 337, in HAB_FISH () File "C: \ Users \ user \ MousePaw Games \ Word4Word \ PYM \ fishtest2.py ", line 100, in init hab_fish_win.set_colormap (rgba) TypeError: Gtk.Widget.set_colormap () argument 1 must be gtk.gdk.Colormap, not Missing
The quick "print rgba" confirms that rgba is "None", therefore an error.
UBUNTU "ONERIC OCELOT" RUN:
Gtk Warning: try drawing pushed with a depth of 24 to readable with a depth of 32
What's happening? I desperately need a transparent background for the window.
source share