1、群里老猫提出的:g_object_set(widget, "can-focus", FALSE, NULL);
2、绑定key-pressed信号:
gboolean key_press_cb(GtkWidget *w, GdkEvent *ev, gpointer data)
{
(void)w; (void)data;
GdkEventKey *key = (GdkEventKey*)ev;
if(key)
{
if(key->keyval == GDK_Tab)
return TRUE;
}
return FALSE;
}
页:
[1]