drawing areas and connecting button-press-event



I need to be able to connect a button-press-event to a drawing area.
Here is the code I am trying to use, I have a function called
event_Canvas_Click
also the line that is commented out I found in the gtk FAQ
section 5.10

GtkWidget *retWidget;
retWidget = gtk_drawing_area_new();
gtk_drawing_area_size(GTK_DRAWING_AREA(retWidget), widgetWidth,
widgetHeight);
//gtk_widget_add_events(retWidget, GDK_BUTTON_PRESS_MASK);
 
gtk_signal_connect(GTK_OBJECT(retWidget), "button-press-event",
GTK_SIGNAL_FUNC(event_Canvas_Click), NULL);
gtk_widget_show(retWidget);

Thanks
Don





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]