[Gtk-sharp-list] more parameters for a callback?
Camilo Uribe
Camilo Uribe <camilo.uribe@gmail.com>
Wed, 27 Oct 2004 19:35:17 -0500
On Sun, 24 Oct 2004 12:02:39 -0700, Brad Taylor <brad@getcoded.net> wrote:
> On Sun, 2004-10-24 at 09:45 -0500, Camilo Uribe wrote:
>
>
> > How can I put more parameters into a callback?
>
> I'm assuming you're referring to delegates, correct?
>
> Just extend the EventArgs class and add any parameters that you need.
> For example:
>
> public delegate void SelectionChangedHandler(object o,
> SelectionChangedEventArgs args);
>
> public class SelectionChangedEventArgs : EventArgs
> {
> public int Count;
> public int[] Selected;
> }
>
> Hope this helps.
yes, thanks