Re: Widget background (gtk+-1.2.10)



Draw a rectangle the size of the drawing area
(widget->allocation) with the color you want.

Noah

On Wed, Aug 13, 2003 at 15:14:38 -0600, Nix wrote:
Hi!

Is there a way to override the default background colour of a widget (a
GtkDrawingArea, more specifically).  I tried setting the 
widget->style->fg[0] through widget->style->fg[0] to
widget->style->black, that is:

for (i = 0 ; i < 5 ; i++)
memcpy (&widget->style->fg[i], &widget->style->black, sizeof(GdkColor));

This worked, but it also set the background of all my other widgets.  My
menus, for example, now had a black background and were unreadable.  Is
there a better way ?



TIA



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