Re: Background color in GtkText




Mario Motta <mmotta@guest.net> writes:

> On Mon, 07 Sep 1998, tile@primenet.com wrote:
> >
> >
> >This is the step in the right direction, but you're using the wrong array.
> >Here's how I would do it...
> >
> >GtkStyle *style;
> >
> >...
> >
> >style = gtk_style_new ();
> >style->fg[GTK_STATE_NORMAL] = foreground;
> >style->text[GTK_STATE_NORMAL] = foreground;
> >style->base[GTK_STATE_NORMAL] = background; /* base not bg */
> >
> >gtk_widget_set_style (GTK_WIDGET (entry), style);
> >
> >Hope this helps.
> >
> >
> this seems to work for entry widgets, unfortunately not for text ones, (but
> should) anyway thanks for the answer.

In GTK+ 1.0, you can't change the style of a Text widget on
the fly. If you do it before the widget is realized, it should
work, however.

> with pleasure i see that sometime
> someone in this list has the time to answer to numerous questions. A bit of
> statistics: i'm into the list since July and there three times less answers
> than questions.

Hmmm, there are a few more unanswered questions than I would like
(only so many hours in the day), but browsing, it doesn't look like
nearly a 2:1 unanswered:answered ratio to me in general...

(Hint: asking a question three times does not make it any
 more likely that it will get answered. Subjects in all
 caps will almost certainly get ignored.)

Regards,
                                        Owen



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