the button how to receive key presses
- From: dashikugua 126 com
- To: "gtk-list" <gtk-list gnome org>
- Subject: the button how to receive key presses
- Date: Tue, 15 May 2007 11:29:32 +0800 (CST)
Hi all :
Sorry for my English.
I want to know the GtkButton how to recieve key presses event in my application. In my app, there are three GtkEntries in the left part of the window and three GtkButtons in the right. I want the buttons to receive only the specific alphabetic key (e.g. GDK_a,GDK_b,GDK_c)from the keyboard input and activate the corresponding entry in the callbacks function of the button' key press event.The entrys receive and show the numeric key and not react to the alphabetic key input. My problem is that when one entry is actived, how can I make the button receive the key press event when I input the alphabetic key.For example,now the first entry is actived(this entry has text ,e.g.1000 ) . I want to press the GDK_b the active the second entry and keep 1000 in the first entry. But when I press GDK_b,it's the first entry that receives and shows the "b" not the first button receive the key presees event. I think the reason is that it's the entry that is getting the focus not the button.
I don't know how to solve the problem. Any help will be appreciated. Thanks.
免费试玩2006中国最佳网络游戏--梦幻西游
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]