Re:About drawing area's keypress event
- From: rings <rings etang com>
- To: gtk-app-devel-list gnome org <gtk-app-devel-list gnome org>
- Subject: Re:About drawing area's keypress event
- Date: Wed, 1 Nov 2000 9:56:44 +0800
Hi:
Thanks for Black's advice.I find answer in the archive.I download all archive,in the 2000-february.txt file
,Havoc give a very detailed answer.
Thanks everybody
Rings
I assume the drawing area is packed into a main window via some mechanism.
The drawing area must have the focus to receive key press events from the
parent. You should make sure that the drawing area widget has the CAN_FOCUS
flag, otherwise it can never receive the focus.
Best Regards,
Norman Black
Stony Brook Software
----- Original Message -----
From: "rings" <rings etang com>
To: <gtk-app-devel-list gnome org>
Sent: Monday, October 30, 2000 05:36 PM
Subject: About drawing area's keypress event
Hi:
Many thanks for everybody's advice.Now,I have a question.I use
gtk_widget_set_events() to probe a drawing_area's keypress event,but I
cann't get it.However I may get a buttonpress event.My codes is these below.
file://*********************************************************************
*******//
gtk_widget_set_events (GTK_WIDGET(drawing_area), GDK_EXPOSURE_MASK
| GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK
| GDK_BUTTON_RELEASE_MASK |GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK);
gtk_signal_connect (GTK_OBJECT (drawing_area), "key_press_event",
GTK_SIGNAL_FUNC(KeyPrs_CallBack),NULL);
file://*********************************************************************
*******//
If I use window(a Gtk's toplevel window) to replace drawing_area,I may get
keypress event.How can I get drawing_area's keypress event?
Thanks!
rings
rings etang com
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
rings
rings etang com
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]