[Gtk-sharp-list] Label PopulatePopup

Ben Motmans ben.motmans at gmail.com
Wed Jul 13 19:01:00 EDT 2005


On 7/11/05, underdog10 at netcourrier.com <underdog10 at netcourrier.com> wrote:
> Hello,
> 
> I'm trying to make an Popup when right click is pressed on a Label.
> As show in the code below, the label "statuslabelconnexion" is pack in a statusbar, same for the image.
> I have made two events but i don't received any!
> Could you help, please?

Add the ConnectBefore attribute

[GLib.ConnectBefore] 
private void OnLabelButtonPressEvent(object o, ButtonPressEventArgs args)

the default event handler is going to discard the button press event,
and since you are connected after the default event, you never receive
the event
using ConnectBefore makes sure your event handler is called first

-- Ben


More information about the Gtk-sharp-list mailing list