widget jumping



Hello gtk-list,
 
given:
 
>  GtkWIdget *entry;
>  gint key_press_event (GtkWidget *widget, GdkEventKey *event) {
>     
>      if (event->keyval == GDK_1) {
>          // ... <- CODE TO JUMP TO AN ENTRY WIDGET?
>          return TRUE;
>      }
>      return FALSE;
>  }
 
with
 
>  text = gtk_text_new (NULL, NULL);
>  ...
>  gtk_widget_set_events (text, GDK_KEY_PRESS_EVENT);
>  gtk_signal_connect (GTK_OBJECT (text),
>      "key_press_event",
>      (GtkSignalFunc) key_press_event, NULL);
 
we have two questions:
 
1. when key "1" is pressed inside a text widget, key_press_event() is called, and returns TRUE. However, should this not stop event propagation and mask out the
"1" from the visible text?
 
2. Is there a function, gtk_JUMP(TargetWidget), which enables a jump from the text widget to an entry widget, so that we now are placed with a cursor inside a text entry widget?
 
Thank you gtk-list from frederik_jensen get2net dk
 
 
 


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