Re: [gtk-list] Re: changing a widget's background
- From: Gert <gs2 nowmoo demon nl>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: changing a widget's background
- Date: Wed, 28 Apr 1999 00:48:20 +0200 (CEST)
On Tue, 27 Apr 1999, Ramiro Estrugo wrote:
> I tried the code and it does what i want; but only if the widget has not
> been realized.
>
> How can I get the same behavior after a widget has been realized ?
I use:
---
GtkStyle *style = gtk_widget_get_style(widget);
style->fg[GTK_STATE_NORMAL].red = 0xffff;
style->fg[GTK_STATE_NORMAL].green = 0;
style->fg[GTK_STATE_NORMAL].blue = 0;
gtk_widget_set_style (widget, rc_style);
--
> thanks
>
> -re
>
> Owen Taylor wrote:
> >
> > A quick example of using would be:
> >
> > ===
> > GtkRcStyle *rc_style = gtk_rc_style_new();
> >
> > rc_style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_FG;
> > rc_style->fg[GTK_STATE_NORMAL].red = 0xffff;
> > rc_style->fg[GTK_STATE_NORMAL].green = 0;
> > rc_style->fg[GTK_STATE_NORMAL].blue = 0;
> >
> > gtk_widget_modify_style (widget, rc_style);
> > ===
> >
> > Regards,
> > Owen
-------------------------------------------------------------------------------
~ Gert, Gs2, The Blue Mage - whatever you prefer
'v' E-Mail : Gs2@dds.nl
// \ Computer : nowmoo.demon.nl
/( )\ Project : gMOO, a MOO (and MUD) client for the unises
^`~'^ HomePage : http://www.nowmoo.demon.nl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]