Complete newbie question about colors



Hi,

I have just started program a bit with the GTK+ toolset. Now I have a
(seemingly) very simple question about colors.

I create a frame with,
 
  myframe = gtk_frame_new ("Label");

then continue to create a drawingare and pack the two together,

  mydraw = gtk_drawing_are_new();
  gtk_container_add(GTK_CONTAINER(myframe) , mydraw);

So far, so good. Now i want the drawingare displayed with a different
color. I have tried several varieties of :
 
  .... 
  colormap = gtk_widget_get_colormap(...)
  colormap = gdk_colomap_new (...)
  gdk_color_alloc(..)	
  gdk_window_set_background(..)
  ....

Some varieties won't compile at all, some generate compiler
warnings, some run-time warnings and some don't complain at all. But
unfortunately they *all* produce the same gray drawingare.

I have searched through old mail archives as well as all the
documentation I have found. So allthough some of you might find this
question big-time lame I have really tried to find out myself.

Anyway, any response would be greatly appreciated,

Joakim Hove






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