buttonRun_Click(sender, e);

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

1. Is this the correct code to have in toolStripStatusLabel3.TextChanged
event to trigger another buttons click event?

toolStripStatusLabel3.TextChanged += buttonRun_Click;
buttonRun_Click(sender, e);

2. What the heck does this do?

toolStripStatusLabel3.TextChanged += buttonRun_Click;

I am very confused by this stuff.
Thanks
CM
 
1) Yes, but once you have added the delegate that invokes buttonRun_Click to
the TextChanged Event, you do not need to invoke it also with your second
line.
2) this adds buttonRun_Click event handler method to the invocation list of
the TextChanged event of toolStripStatusLabel3. Now when the Text of the
control changes, buttonRun_Click will be called.

-- Peter
// It works on my machine!
http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top