[Gtk-sharp-list] HideOnDelete then DeleteEvent occurs?

Sebastian Vorköper sv@fogman.de
Sat, 03 Apr 2004 21:31:40 +0200


Am Sa, den 03.04.2004 schrieb Mike Kestner um 20:37:
> On Sat, 2004-04-03 at 06:39, Sebastian Vorköper wrote:
> > Hello,
> > 
> > how can i use the HideOnDelete() then a DeleteEvent occurs?
> > I need to show a window then the user wants it and hide the windo=
w then
> > the user clicks the delete button.
> > I've put the HideOnDelete Method in the Delete Event handler like=
 this,
> > but this seems to be totally wrong.
> > 
> > public static void on_delete_button2_activate(object obj,
> > DeleteEventArgs e) {
> > 	win2.HideOnDelete();
> > }
> 
> Try marking you handler with the [ConnectBefore] attribute.  It's
> probably not working because your handler is getting run after the
> default handler for DeleteEvent.
> 

No, thats not working. Or I did a mistake. Here is what i've done.

...
win2.DeleteEvent += new DeleteEventHandler(on_delete_button2_activate);
...

...
[ConnectBefore] 
public static void on_delete_button2_activate(object obj,
DeleteEventArgs e) {
	win2.HideOnDelete();
}
...

Greetings,
Sebastian Vorköper
sv@fogman.de