Re: [gtk-list] Can DrawingArea produce key press event?



>I want to catch key press event and draw string in DrawingArea.
>
>
gtk_signal_connect(GTK_OBJECT(drawingArea),"key_press_event",GTK_SIGNAL_FUNC
(keyPressEvent),NULL);
>
gtk_signal_connect(GTK_OBJECT(drawingArea),"expose_event",GTK_SIGNAL_FUNC(ma
inExposeEvent),NULL);
>        gnome_app_set_contents(GNOME_APP(app),drawingArea);
>
>DrawingArea don't call function keyReleaseEvent when I press any key. How
can I do?


    You'll probably have to gtk_widget_add_events(yourwidget,
GDK_KEY_RELEASE_MASK);
    Question 5.7 of the current FAQ deals with this.

    Hope this helps,

    Emmanuel
>
>ÿôèº{.nÇ+‰·ÿ™¨¥þ˧²æìr¸›z dþX¬·úު笷úÞv­ýÊ&ÿ÷^¿ùî
>



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