combo box
- From: Alexey Semenov <swajj yahoo com>
- To: gtk-list gnome org
- Subject: combo box
- Date: Fri, 28 Sep 2001 17:34:42 +0300 (EEST)
hi,
i'd like to rebind default keys of cobmbo box like <ret>, <tab>, <up>,
etc.
...
combo1 = gtk_combo_new ();
...
gtk_signal_connect_object(GTK_OBJECT
(GTK_ENTRY(GTK_COMBO(combo1)->entry )) , "key_press_event", GTK_SIGNAL_FUNC(my_func),
GTK_OBJECT (GTK_ENTRY(GTK_COMBO(combo1)->entry)));
my_func (GtkWidget* widget, GdkEventKey* event, gpointer data)
{
switch (event->keyval) {
...
case GDK_Up:
... do smth. usefull, then i'd like to supress Up ...
gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "key_press_event");
gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "key_release_event");
break;
...
}
... to prevent focus moving out of entry.
all works, but i'm getting:
Gtk-WARNING **: gtk_signal_emit_stop(): no current emission (27) for object `GtkEntry'
and sigsegv some time.
if i remove any of two lines with gtk_signal_emit_stop... or swap
order - focus going out of combobox's entry.
any ideas?
---
See you later...
Alexey.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]