Re: (no subject)



On Mon, 23 Jul 2001 18:28:13 +0200, eckstein said:

How can I change the bg and fg color of a given widget?
 For example I want a screen blu bg and white fg, and within that screen
 a Clist widget red bg and yellow fg.
 If I set the style of Clist , the whole screen bg and fg colors change.
 Where can I find a complete documentation about GTK and GDK function and
 widgets

The way I usually do this is to copy a GtkStyle and then set the
widget to this new style (don't forget to unref this style
afterwards). See gtk_widget_get_style(), gtk_style_copy(),
and gtk_widget_set_style().

You'll need to know how to allocate GdkColors to this new style.

Also note that if the widget has no associated GdkWindow
(ie the GtkLabel has no GdkWindow) then the background set on the
style will have no affect.

-- 
--
Sincerely,                  ,"-_                         \|/
-Capt. Taura M.             ,   O=__                    --X--
.__                          ,_JNMNNEO=_                 /|\
OMNOUMmnne.                  {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn.               'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe              '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe.                "7OMMMMNNNNNWWEEEEOOOOOO"   "'.
EEBNNMMMNWNWWEEIMMNe.             __  7EMMMNNNNNWWWEEEEEEEOO.     " .
NNMMMMWWWMMMWEINMMMNn            "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._     .
                  http://furry.ao.net/~learfox/






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