Information générale
Catégorie:
Programmation Orientée Object
Thanks Alex and Barbara. Alex
>>>I need to recalculate some values every time the user changes any control in a form. Where is the best place to put the code ?
>>
>>Hola Alex,
>>
>>I would add a new method to the form (recalc?) and then call it from every one of your controls' valid event.
>>
>>That way you keep all the code in one place.
>>
>>Alex
>
>Alex and Alex < grin >
>This is a case where subclassing of your controls will simplify the work substantitally! All you'd need then would be to add a form method to handle the recalculation and then add the call to that method to textbox (and edit box etc.) base classes.
>
>If you have several forms that use the same form and textbox classes, just default the form method to 'return .t.' except in the one form that needs recalculations.
>
>HTH
>Barbara
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement