[Gtk-sharp-list] more parameters for a callback?
Brad Taylor
brad@getcoded.net
Sun, 24 Oct 2004 12:02:39 -0700
--=-q2/uvXsNnfS+KSjp5fwO
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
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,=20
SelectionChangedEventArgs args);
public class SelectionChangedEventArgs : EventArgs
{
public int Count;
public int[] Selected;
}
Hope this helps.
-Brad
--=20
Brad Taylor
Genome Software LLC
http://www.getcoded.net
--=-q2/uvXsNnfS+KSjp5fwO
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQBBe/xPWZT8MXyJ2AURAtTtAJ9TGEsAXCwVozs721BhWSkvTlNvMACglR8k
H0RyzUq4LkfylkaTcVf0r0g=
=nF+U
-----END PGP SIGNATURE-----
--=-q2/uvXsNnfS+KSjp5fwO--