Re: button_press_event for custom widget
- From: "Florian Schaefer" <listbox netego de>
- To: gtk-app-devel-list gnome org
- Subject: Re: button_press_event for custom widget
- Date: Sun, 21 Nov 2004 16:20:46 +0100
Hi Tristan!
On Mon, 15 Nov 2004 09:50:21 -0500, Tristan Van Berkom said:
[...]
Why are you creating a GtkDrawingArea ?, this widget already *is* a
drawing area, "events" on this widget come from the gdk layer from
Ouch, that hurts. :-) That happens if one tries to do something while
knowing and understanding only half of what one does. But I have to admit
that it makes sense this way... ;-)
`GTK_WIDGET(widget)->window', so usually you need to do
gtk_widget_set/add_events (widget, event_mask), in the init function:
gtk_spect_vis_init (GtkSpectVis *spectvis)
{
GtkWidget *widget = GTK_WIDGET (spectvis);
gtk_widget_add_events (widget, GDK_BUTTON_PRESS_MASK);
}
Thanks a lot. It actually works if one does it right.
Ciao
Florian
PS: Sorry for the delay in my reply but all my other mails had been
blocked by the mailinglist software due to my attached gpg signature. I
wonder why...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]