General information
Category:
Forms & Form designer
You are using a wizard generated form. Are you also using the wizard generated toolbar for navigation and editing? If so, then the code that runs when you click on those buttons (including saving) is in various class methods in WIZSTYLE.VCX.
If you want to have code run in addition to the default code then you can put it one of several places. In the baseclass, for example, edit the method that now perform's the save. Or in the toolbar your wizard created (?). If you put it in the click method of the save button, for example, then you *probably* still want the baseclass method to fire. In that case you need to add a DODEFAULT call in your code. Check the help on DODEFAULT: it's a very useful function. DoDefault will cause the parentclass method to fire. Otherwise your code will override the parent class. Sometimes you want that and sometimes you don't.
Where exactly you put the code will depend on your judgement. For me, it took following the class heirarchy back from my wizard-generated forms through to the base classes in the library. I ended up copying my WIZSTYLE.VCX and I modified a lot of the code there--that's how I got started in VFP understanding exactly where code "lives."
>Thanks for the reply, but I am still not sure where exatcly to put
>the code.
>And secondly the dodefault()....where do I put that
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only