Russell Nelson wrote: >I've got a GtkTable populated with GtkPixmaps, used as status >indicators. What I'd *like* to do is switch from the idle pixmap to >the remote pixmap when that connection goes to remote. I've tried >creating new GtkPixmaps from the image data, and table.attach()'ing >it, but that seems to overlay the previous GtkPixmaps. So when I >refresh the screen, each and every previous GtkPixmap gets drawn. I >can't imaging that's a good thing, so how do I do it right? > What you probably want to do is to load the images once (that is, the pixmap and mask). Multiple GtkPixmap widgets can share the same pixmap/mask combo, and you can change what pixmap/mask an existing GtkPixmap widget is displaying.
Something like: remote, remote_mask = gtk.create_pixmap_from_xpm(widget, None, "remote.xpm") inactive, inactive_mask = gtk.create_pixmap_from_xpm(widget, None, "inactive.xpm") ... pmap = gtk.GtkPixmap(inactive, inactive_mask) ... pmap.set(remote, remote_mask) James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
