Hello,
I've problems to catch an event with a dinamically created button.
Involved code follows:
btAccept = new Gtk.Button ( new Gtk.Label ("Accept"));
btAccept.Events = Gdk.EventMask.AllEventsMask;
btAccept.ButtonPressEvent += new ButtonPressEventHandler
(UpdateWidgetProperties);
...
public void UpdateWidgetProperties (object o, ButtonPressEventArgs args ) {
...
}
The problem is that when I press the button btAccept, the function
UpdateWidgetProperties is NOT called (I've even put a breakpoint within
it to confirm this point).
Sure I forgot some step, but I do not figure out what...
Anyway I've solved it using btAccept.Clicked instead ButtonPressEvent
and EventArgs instead of ButtonPressEventArgs, but I do not know why the
code showed here does not work as expected. :-?
Regards,
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list