Re: [gtk-list] Re: Howto set colour?
- From: "Peter R. Brinkler" <riishigh daimi au dk>
- To: gtk-list redhat com, nodatadj webtribe net
- Subject: Re: [gtk-list] Re: Howto set colour?
- Date: Sun, 15 Aug 1999 00:15:36 +0200
Thanks for the reply Iain,
I got it working by following your advice:
This is the corrections I made if anybody else has the same problem.
GtkStyle *style = gtk_style_copy (_ColorButtonFrame->style);
C.red = (gushort)( 65535 * color );
C.green = (gushort)( 65535 * color );
C.blue = (gushort)( 65535 * color );
style->bg[GTK_STATE_NORMAL] = C;
gtk_widget_set_style( _ColorButtonDA, style );
> > Hi all,
> > I have a small problem:
> > I would like to set the colour of a DrawingArea (or any other widget for
> > that matter).
> try changing the style of the widget...
> style = gtk_style_copy (drawingarea->style);
> style.bg[GTK_STATE_NORMAL] = colour;
> drawingarea->style = style;
> (NB: I haven't tried this and some names of things are almost 100% certain
> to be wrong, but I think the theory is right, if not the implementation)
> To unsubscribe: mail -s unsubscribe firstname.lastname@example.org < /dev/null
] [Thread Prev