[pygtk] setting the colormap in widgets, question
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
Re: [pygtk] double click on a CList
Hi again, Ricardo Caesar Lenzi wrote: > > Try this: > > def on_clist_button_press_event(clist,mousebutton,data): > if mousebutton.type==5: >print "Double-click!" > > clist.connect("button_press_event",on_clist_button_press_event) > > - Ricardo this does not work because the mousebutton in the previous example returns me a gdkEvent object and I don't know its structure. Probably it contains the information I need but I can't get it Can you give me some information about the structure of a GdkEvent object ? (a link to some docs is also appreciate) thanks to all Pier Carteri [EMAIL PROTECTED] ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
Re: [pygtk] double click on a CList
Pier wrote: > Hi to all > i need to handle a double click on a row of a CList but i can't figure > the name of the signal ("double_click" does not > work); any idea > Tks > > Pier > > ___ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk Try this: def on_clist_button_press_event(clist,mousebutton,data): if mousebutton.type==5: print "Double-click!" clist.connect("button_press_event",on_clist_button_press_event) - Ricardo ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
[pygtk] double click on a CList
Hi to all i need to handle a double click on a row of a CList but i can't figure the name of the signal ("double_click" does not work); any idea Tks Pier ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk