Thaxs Yeti for the answer but Sorry I'm not able to do it. I explain a little bit what im doing and i would like to do: main(){ mem_map=gtk_drawing_area_new(); gtk_signal_connect (GTK_OBJECT (mem_map), "expose_event",(GtkSignalFunc) expose_event, NULL); gtk_signal_connect (GTK_OBJECT(mem_map),"configure_event",(GtkSignalFunc)configure_event, NULL); gtk_signal_connect (GTK_OBJECT (mem_map), "button_press_event",(GtkSignalFunc) button_press_event, NULL); /*A button to erase all the drawed and paint things*/ boton = gtk_button_new_with_label ("Clear and paint"); gtk_signal_connect_object (GTK_OBJECT (boton), "clicked",GTK_SIGNAL_FUNC (clear_and_paint),GTK_OBJECT (main_window)); show.... }
void expose_event(){ gdk_draw_pixmap } void clear_and_pain(GtkWidget *widget, GdkEventExpose *event){ /*HERE!!!!!!!! I WANNA CLEAN ALL MY DRAWED AREA*/ gtk_widget_queue_draw_area(GTK_WIDGET(mem_map),0,0,910,440); /*This up should clean all the area??? */ /*And later draw things.....*/ draw_brush(); } Any idea anyone....??? Has done somthing similar???? David Nečas (Yeti)-2 wrote: > > On Thu, May 31, 2007 at 03:35:07PM -0700, nahuel9728 wrote: >> I explain my thing... I have a pixmap, a drawing area. >> There are events that draw on it. But i have a button that must clear, >> erase >> all the painted on the drawing area. >> Any idea how to make it happen???? > > Make the drawing area repaint (e.g. with gtk_widget_queue_draw()) > and just do not draw anything there in the "expose-event" > handler this time. > > Yeti > > -- > http://gwyddion.net/ > _______________________________________________ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > > -- View this message in context: http://www.nabble.com/Clear-A-Pixmap-tf3849301.html#a10922708 Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com. _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list