Keypress and gtk_drawing_area



Hi,
When i press a key, the callback is invoked ok with:

  g_signal_connect(G_OBJECT(window),"key_press_event",G_CALLBACK(key_press_cb),NULL);


Now i put a gtk_drawing_area in window and did:

  gtk_widget_set_events(drawing_area,GDK_KEY_PRESS_MASK);
  g_signal_connect(G_OBJECT(draw_area),"key_press_event",G_CALLBACK(key_press_cb),NULL);

but the callback no longer works.




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