hi, this is my first time to visit here. say hello to every body!
I met a problem about set fg color to a new created gc as following code show:

def area_expose(area, event):
      gc = area.window.new_gc()
      color = gtk.gdk.Color(65535,0,0) # red
      gtk.gdk.colormap_get_system().alloc_color(color)
      gc.set_foreground(color)
    
      #then do some drawing on area.window


but color not be set porperly as I want.
I used to do like this with pure gtk+, it works fine

I googled and changed like this:

gc.set_rgb_fg_color(color)

now it works.

any one can tell me why this happened?

Thanks


_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to