|
-
April 27th, 2004, 03:47 PM
#1
Delegate Question
In form based callbacks, where does the eventargs param come from?
I am implementing a dialog with eight browsing buttons that all share the same openfileDialog. I would like to have one callback function that serves all the browsing buttons and can identify who was clicked.
ie, a method like:
private void GenericBrowse_Click(object sender, System.EventArgs e)
{ ... // some code that only differs in who was clicked }
where all the browsers would subscribe like:
this.buttonBrowse1.Click += new System.EventHandler(this.GenericBrowse_Click);
In order to do this, i think i need to derive from System.EventArgs and give the derivative a "who was clicked" attribute. How do i do this and where is it created?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|