J
jralford
Hi,
Another question from a C# newbie:
I have a usercontrol class that includes a customized control.
Now, if I create an instance of the class, and click on it, a click
event is raised for the customized control within the class. This is
good.
What I also want is to raise a click event for the class itself.
For instance,
If I have class A (user control), with Custombutton B in it,
I create an instance of A.
then at runtime if I click on B, My Custombutton code can see the
click and act accordingly (which is good), however, my A class wont
report back that the A usercontrol has been clicked.
How can I do this?
I am guessing it is something like, within the class, declare
delegates etc, and if the Custombutton B is clicked, raise an event.
If this is the case, an example would be nice
(what I am actually trying to do here is have a usercontrol within a
form that I can click and drag around the screen. However, that
usercontrol has other controls within it. I should be able to click
and drag from anywhere within the usercontrol, even if clicking on
other controls)
Thanks very much.
Another question from a C# newbie:
I have a usercontrol class that includes a customized control.
Now, if I create an instance of the class, and click on it, a click
event is raised for the customized control within the class. This is
good.
What I also want is to raise a click event for the class itself.
For instance,
If I have class A (user control), with Custombutton B in it,
I create an instance of A.
then at runtime if I click on B, My Custombutton code can see the
click and act accordingly (which is good), however, my A class wont
report back that the A usercontrol has been clicked.
How can I do this?
I am guessing it is something like, within the class, declare
delegates etc, and if the Custombutton B is clicked, raise an event.
If this is the case, an example would be nice
(what I am actually trying to do here is have a usercontrol within a
form that I can click and drag around the screen. However, that
usercontrol has other controls within it. I should be able to click
and drag from anywhere within the usercontrol, even if clicking on
other controls)
Thanks very much.