key bindings



I've got a qustion. :)

In the program I write there is a GtkList instance, which is
inside of GtkScrolledWindow:

    ...

    sw = gtk_scrolled_window_new (NULL, NULL);
    list = gtk_list_new ();

    gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), list);

    gtk_widget_show (list);

    ...

Now I want to connect a function that would respond to key_press events:

    ...

    gtk_signal_connect (GTK_OBJECT (list), "key_press_event", GTK_SIGNAL_FUNC (my_handler), NULL);

    ...

Where

guint
my_handler (GtkWidget *w, GdkKeyEvent *event)
{
    ...
}

I never get control to this function.  Why?

Thanks,

--
Mike



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