Re: Toolbar button press



Jacob Ilsø Christensen <firelake stofanet dk> writes:

Hi.

I would like to show a context menu when the right mouse button is
clicked on the toolbar. I tried the following but nothing seems to
happen. Any ideas?

g_signal_connect (toolbar, "button_press_event",                       
G_CALLBACK(toolbar_button_press), NULL);

You'll probably need to connect to the button press event on
individual buttons -- GtkButton returns TRUE out of its
default button_press_event handler for all buttons, so the
button press will never propagate to the parent widget.

(If it doesn't work for unoccupied areas of the toolbar either,
then you might need to use gtk_widget_set_events() on the
toolbar)

Regards,
                                        Owen

("_" and "-" are generally treated as equivalent for signal and
property names)




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