Hello,
can anyone help me with this colormap issue?

My application needs to use another colormap then the system colormap. I
was looking for methods to set the colormap for the whole widget tree or
at least for individual widgets or windows, but those methods either are
not exported to PyGTK or they are not working. The only way I got this
halfway to run was to modify gtkmodule.c and introduce a 'set_colormap'
method for GDKwindow. This method uses 'gdk_window_set_colormap' and
calls XSetWindowColormap which does what this is all about. However, it
only works for GtkDrawingArea's and of course the area's window must be
exposed to the screen. The configure event is a good place for it,
something like:

def configure_event(darea, event, mainObj):
   drawable=darea.get_window()
   drawable.set_colormap(mainObj.colormap)


Unfortunately, none of this works for GTKbuttons, where I don't have
access to the 'configure' or 'expose' event.
So, my question is: Is there a method to set the colormap for Gtk
widgets, esp. buttons, prefereable before they are exposed to the
screen?
Does it make sense to modify the GtkStyle to allow setting the colormap?
Does anyone have some ideas which could help me?

Thanks,
Carsten



_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to