Re: [gtk-list] Howto set colour?




> 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)

Iain



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