newbie question



I would like to attach a function to a click on a gtk pixmap or a gtk vbox.
I've tried various code and finally my conclusion is that it's impossible.
This seem's to be because these widgets don't own a (X) window. In my
(limited) understanding these are drawn directly on there parent window.

With a vbox and the following code,

gtk_widget_add_events(GTK_WIDGET(vbox),GDK_BUTTON_PRESS_MASK);
gtk_signal_connect(GTK_OBJECT(vbox), "button-press-event",
   (GtkSignalFunc)card_clicked_cb, (gpointer)card);

the card_clicked_cb is never called when I click in the vbox.

Christophe

-- 
Christophe Barbé
Software Engineer - christophe barbe lineo fr
Lineo France - Lineo High Availability Group
42-46, rue Médéric - 92110 Clichy - France
phone (33).1.41.40.02.12 - fax (33).1.41.40.02.01
http://www.lineo.com




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