gtk-app-devel-list  

how to draw something on GtkDrawingArea when I click a button?

Tolic Ma
Thu, 18 Mar 2010 22:35:17 -0700

Hi,everyone!

I want to draw something on GtkDrawingArea when I click a GtkButton,but I
don't know how to do this...

this is my code(it doesn't work...):

*void click_button(void){


gdk_draw_line(drawing_area,drawing_area->style->white_gc,x,y,width+x,height+y);

}

int main(int argc,char *argv[]){
   ...
   g_signal_connect(button,"clicked",G_CALLBACK(click_button),NULL);
   ...
}*
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list