hi, one possible paradigm is to adhere to the following guidelines: 1) the configure event callback is responsible for calling all routines responsible for "drawing" the pixmap for ultimate display, but does NOT do the actual display to the screen; 2) the expose event callback is responsible for rendering the current pixmap to be displayed to the screen, but does NO "drawing" here, only render the pixmap to the screen via gdk_draw_drawable() or equivalent; 3.1) the drawing routine(s) are responsible for creating the pixmap for ultimate display; 3.2) store the address of the pixmap in a variable that the expose event callback also has access to (global or otherwise) 3.3) the last command as part of the drawing routine is to call gtk_widget_queue_draw_area() on the widget used to display the pixmap; this will force an expose event in this manner, your drawing routine is called on all configure events followed immediately by the expose event rendering the pixmap to the screen. while calling your drawing routine via a user-event, or some other event internal to the program, will also result in the expose event being called to render the newly made pixmap to the screen. so, in your case, you would attach the button-click to a callback ultimately calling your pixmap drawing routine. the drawing routine will then be called on button-click and your new pixmap will be rendered via the expose event. cheers, richard On Aug 2, 2006, at 11:43 AM, Roses Roses wrote: > Hi!!! > > I'm programming a little interface but I have a prblem. The > objective of > this program is shows a pixmap qhich must ghange qhen the user > clicks on a > button. How the fuction of the button can change the pixmap assigned? > > One idea I've is declare the GtkPixmap as a global variable, but > I'm not > sure if this plan can run. > > Thank you very much > > _________________________________________________________________ > Descarga gratis la Barra de Herramientas de MSN > http://www.msn.es/usuario/busqueda/barra?XAPID=2031&DI=1055&SU=http% > 3A//www.hotmail.com&HL=LINKTAG1OPENINGTEXT_MSNBH > > _______________________________________________ > > gtk-list@xxxxxxxxx > http://mail.gnome.org/mailman/listinfo/gtk-list > _______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list