[pygtk] Transparent textview background
dx at dxzone.com.ar
Wed Oct 10 02:00:06 WST 2007
I'm trying to set a background image to a textview. The.. obvious?
ways to do it (hack expose function, set_back_pixmap, etc) worked..
until I tried it inside a ScrolledWindow, which resulted in many
partial renderings of the same pixmap...
So, to have a fixed background, I have to put that image outside the
ScrolledWindow. But then, I had the textview background. How can I set
a transparent background for a textview?
Things i've tried:
does nothing with GC changes, black background with color changes..
wtf? Is this a bug?
sets only the background color, but works
Style changes I've tried:
style.base_gc[gtk.STATE_NORMAL] = gc
style.bg_gc[gtk.STATE_NORMAL] = gc
style.bg[gtk.STATE_NORMAL] = gtk.gdk.Color(50,100,150)
style.base[gtk.STATE_NORMAL] = gtk.gdk.Color(50,100,150)
...set_back_pixmap(None, True) # black background
...set_back_pixmap(None, False) # normal background
Also some gtkrc change tests, that failed too.
ps: before anyone asks why do I need this, it's because we need a bit
more powerful html renderer.
More information about the pygtk