Kevin,
>>On the debugging question, I did an example of this, and placed a breakpoint right before the equivalent of the dodefault() (the base.ClickHandler)...when I ran it and stepped through the code with the F11 key, I was able to trace all the way back to the behavior in the base class.But this is in the sub-class, right? Mark was talking about a breakpoint in the eventhandler on the form.
>>If you have a base class with certain behavior in an event (e.g. click event) that you always want to fire, and then you want to drop that control on a form *once* and have some special behavior fire in addition to the base behavior, I would *think* you'd want to do something similar to what you do in VFP...drop the control on the form, set up a click event, in the click event put in your additional behavior, and then call the base handler.You wouldn't need to call the base eventhandler ... it's done automatically before your code executes.
~~Bonnie
>Bonnie/Mark,
>
>Sorry for jumping in, but just wanted to share this...
>
>On the debugging question, I did an example of this, and placed a breakpoint right before the equivalent of the dodefault() (the base.ClickHandler)...when I ran it and stepped through the code with the F11 key, I was able to trace all the way back to the behavior in the base class.
>
>On Mark's other question, there's something I'm still a little confused about (maybe because I didn't quite understand the original example)...
>
>If you have a base class with certain behavior in an event (e.g. click event) that you always want to fire, and then you want to drop that control on a form *once* and have some special behavior fire in addition to the base behavior, I would *think* you'd want to do something similar to what you do in VFP...drop the control on the form, set up a click event, in the click event put in your additional behavior, and then call the base handler.
>
>(Or you could do what was described, create a subclass of the base class, put in your 2nd behavior there, and then drop the subclass on the form)
>
>But if you're dropping the base class on a form 5 times, and the 'additional behavior' is the same for all five, then definitely, I'd say you'd want to do what was described...take the base class, subclass it to put your additional behavior in, and then drop that subclass on five times. (Or maybe something like that is an opportunity to set up an interface?)
>
>Am I missing something, or is there a better way to do this? (again, sorry for jumping in, don't mean to cause confusion, I was a little hazy on this after I originally responded)
>
>Kevin