Re: [gtk-list] Re: changing a widget's background
- From: "Janet M. Birch" <jbirch entergy com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: changing a widget's background
- Date: Wed, 05 May 1999 15:57:04 -0500
should this apply to ANY widget ? i tried it (both methods) with my labels and i
didnt get any color change.
what AM i doing wrong.
Gert wrote:
> 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
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
--
jbirch@entergy.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]