RE: [gtk-list] text background




On 12-Aug-98 tile@primenet.com wrote:
> In a gtk text widget, how do I change the color of the background? 
> gtk_text_insert() allows you to change the fore and back grounds,
> but that only
> affects the inserted text.  How can I change the entire background
> color?

Here's what I use in Bezerk to change the background to black and the
text to white:

  style = gtk_style_new();
  style->fg[GTK_STATE_NORMAL] = style->white;
  style->text[GTK_STATE_NORMAL] = style->white;
  style->base[GTK_STATE_NORMAL] = style->black;
  gtk_widget_set_style(text, style);

Thanks

tony


---
E-Mail: trog@gtk.org
I wish you humans would leave me alone.

Go Bezerk! http://www.gtk.org/~trog



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]