I want to make the background of a textview widget black and the foreground white.
Been trying the .modify_bg
and .modify_fg
methods, but none affect the way this thing looks.
Can anyone suggest anything or is this just not possible?
I want to make the background of a textview widget black and the foreground white.
Been trying the .modify_bg
and .modify_fg
methods, but none affect the way this thing looks.
Can anyone suggest anything or is this just not possible?
I resolved some similar manipulating the gtk rcstyles:
widget.set_name('mywidget')
# Set mywidget internal style.
gtk.rc_parse_string('\
style "mywidget"\n\
{\n\
attribute1 = value1\n\
attribute2 = value2\n\
}\n\
widget "*.mywidget" style "mywidget"')
See gtk.rcstyle at:
bg[state] = color (Sets the color used for the background of most widgets.)
Use gtk.Widget.modify_text
and gtk.Widget.modify_base
instead of fg and bg.