Modifiers of controls in an inherited form question

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

Guest

I have a form template: EditorTemplate with a toolstrip containing three
buttons: Add, Modify, Delete. All three buttons have their Modifier property
set to Public. Used to be that, in beta1, - from the the form: ItemEditor
that inherits from my template - I can double-click on the Add button and add
code to it. Using Beta2, I can't seem to do it anymore. What do I need to
do here?
 
Amil said:
I have a form template: EditorTemplate with a toolstrip containing three
buttons: Add, Modify, Delete. All three buttons have their Modifier
property
set to Public. Used to be that, in beta1, - from the the form: ItemEditor
that inherits from my template - I can double-click on the Add button and
add
code to it. Using Beta2, I can't seem to do it anymore. What do I need
to
do here?

I've posted this error myself on the msdn feedback site. The response I got
back was that this was not a bug, it is a "feature". Something about not
being able to modify list collections in descendant classes because it would
be too much work and they don't have enough time and etc...

The solution is in your base class to have the double-click event handlers
call a virtual routine, like AddRecord(). Then in your descendant classes,
you can override that routine and do whatever you want.

HTH,

Mike Rodriguez
 
Back
Top