| View previous topic :: View next topic |
| Author |
Message |
Osiris
Joined: 17 Dec 2005 Posts: 65
|
Posted: Sun Feb 26, 2006 2:09 pm Post subject: how to listen to a key pressed event? |
|
|
Hello,
in a GtkNotebook-Tab (my search-tab) i want to listen to the key pressed event.
When the key "Return" is pressed i want to emmit the signal for the search button.
Can somebody show me an example of doing this?
Thanks a lot.
Christian |
|
| Back to top |
|
 |
cweiske
Joined: 08 Dec 2005 Posts: 454 Location: Leipzig/Germany
|
Posted: Sun Feb 26, 2006 2:35 pm Post subject: |
|
|
| What do you mean with "notebook tab"? I thought notebook tabs don't get the focus. |
|
| Back to top |
|
 |
Osiris
Joined: 17 Dec 2005 Posts: 65
|
Posted: Sun Feb 26, 2006 2:49 pm Post subject: |
|
|
When I've selected my search tab (notebook page)
here is the page
I would be able to listen, if the "Return"-key is pressed.
If this key is pressed i want to emmit the signal for start searching instead of the search button emmits this signal. (I know, very bad english ....) |
|
| Back to top |
|
 |
cweiske
Joined: 08 Dec 2005 Posts: 454 Location: Leipzig/Germany
|
Posted: Sun Feb 26, 2006 2:53 pm Post subject: |
|
|
| You need to connect the key press signal on each text entry widget, not the whole notebook. The notebook or the tab don't get the events. |
|
| Back to top |
|
 |
Osiris
Joined: 17 Dec 2005 Posts: 65
|
Posted: Sun Feb 26, 2006 3:20 pm Post subject: |
|
|
ok, at the end, this was more than easy after reading some Threads in the mailing-list.
Pressing the enter key emits the activate-signal..
more about this here
Last edited by Osiris on Sun Feb 26, 2006 3:54 pm; edited 1 time in total |
|
| Back to top |
|
 |
cweiske
Joined: 08 Dec 2005 Posts: 454 Location: Leipzig/Germany
|
Posted: Sun Feb 26, 2006 3:25 pm Post subject: |
|
|
| If you used MARC or so, could you give the urls so that people having the same problems will find it faster? |
|
| Back to top |
|
 |
|