In Vala, using a GTK GUI, how do I change the background and foreground colors of a TextView widget without using a color chooser?
It would be nice if I could just put in a hexadecimal value or something.
I tried this, but it didn't seem to work:
Code:
var mybgcolor=Gdk.Color();
mybgcolor.red=0;
mybgcolor.blue=0;
mybgcolor.green=0;
this.text_view = new TextView();
this.text_view.modify_bg(Gtk.StateType.NORMAL, mybgcolor);
Also, if you can give similar help on how to set the font, let me know.
It's easy enough to do these things with WxPython (in Python), however, but Python won't suffice well for what I'm making. It'd be nice if they had WxWidgets for Vala.
Bookmarks