[Gtk-sharp-list] Changed Event

Wolfgang Mauer W.Mauer at top-soft.info
Tue Dec 9 06:14:23 EST 2008


No,
i ment that my coding work with ms but not with mono.
the 
eInfo.AddEventHandler(this.widget, del);
fires a exception.

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)
{
}

> > I try'd this,
> > but now i have the problem that some Widgets like ComboBox have a
> > CellEditable and no Editable interface :-((
> > But all Widget i need have the "Changed" event. Under MS my coding works.
> > This may be a bug?
>
> Are you saying that the Changed event of a Gtk.ComboBox is not fired
> when the selected item is changed?  If this is the case then this is a
> bug and you should submit a bug report with a testcase.



-- 
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