I finally managed to change the background of the textview widget in pygtk. Turns out I need to use widget.modify_base(gtk.STATE_NORMAL, gtk.gdk.Color(0, 0, 0, 0)) , which results in the desired black background.
Now the rest of the problem ... Now I want to change the text color to white.
I tried everything, including widget.modify_fg and widget.modify_text , and yet it seems that nothing changes the color of the text in this text view.
Here is my textual code that I have now
import gtk tv = gtk.TextView() tv.modify_base(gtk.STATE_NORMAL, gtk.gdk.Color(0,0,0,0)) tv.modify_text(gtk.STATE_NORMAL, gtk.gdk.Color(255,255,255,0))
This results in a text view with black bg ... I want this ... but the foreground text should be white.
Any ideas what I need to do?
source share