[Gtk-sharp-list] Changed Event

Wolfgang Mauer W.Mauer at top-soft.info
Fri Dec 5 12:25:05 EST 2008


Hi all,
i try'd to bind a Method("OnWidgetChanged") to the "Changed"-Event of some 
Widgets but like this the event never raised.
Any Help?

	EventInfo eInfo = this.widget.GetType().GetEvent("Changed");
	if (eInfo != null)
	{
		MethodInfo mi = this.GetType().GetMethod("OnWidgetChanged", 
BindingFlags.Instance | BindingFlags.NonPublic);
		if (mi != null)
		{
			Delegate del = Delegate.CreateDelegate(eInfo.EventHandlerType, this, mi);
			if (del != null)
			{
				eInfo.AddEventHandler(this.widget, del);
			}
		}
	}
......

void OnWidgetChanged(object sender, EventArgs e)
{
}


-- 
Top-Soft
Softwareentwicklung
Inhaber: Wolfgang Mauer
Reitesweg 9, 96103 Hallstadt
Tel.: +49 (0)951 / 2221520
Fax: +49 (0)951 / 2221521


More information about the Gtk-sharp-list mailing list