views:

605

answers:

2

Is there any way to set a widget's opacity in PyGTK?
I know there's a function for windows:

gtk.Window.set_opacity(0.85)

but there seems to be no equivalent for arbitrary widgets.
Anyone have any ideas?

Thanks in advance for your help.

+2  A: 

From pygtk reference:

For setting up per-pixel alpha, see gtk.gdk.Screen.get_rgba_colormap(). For making non-toplevel windows translucent, see gtk.gdk.Window.set_composited().

Alex Lebedev
That will still depend on it being a widget that has its own GdkWindow
Ali A
No if you'd like to set per-pixel alpha channel. This would be very difficult to implement correctly, however.
Alex Lebedev
A: 

It might also be worth looking into pygtkglext for fancier widget stuff.

tmatth