Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VMP question
Message
De
10/09/2000 18:16:12
 
 
À
08/09/2000 22:39:00
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00414494
Message ID:
00414732
Vues:
20
Mike and Barry,

Thanks. I suspected as much, but wasn't sure.

Alex


>Hello
>
>Its very rare that every control on a form would be involved in a calculation. I'd make a custom object which does the calculation(s) using the values of the required controls. This object may be placed on different forms if the calculation is the same. Use the ActionOnValid method to call the custom object's calculation method. ActionOnValid only fires after your CustomValid (if any) has indicated the control's value is acceptable.
>
>As an example...
>
>txtBox1 has a value of 1
>txtBox2 has a value of 2
>
>ActionOnValid of both txtBox1 and txtBox2 reads...
>This.Parent.cusSum.Sum()
>
>txtBox3 will be updated to show the result.
>
>cusSum has a Sum method which reads...
>WITH This.Parent
> .txtBox3 = .txtBox1 + .txtBox2
> .txtBox3.Refresh()
>ENDWITH
>
>I think this will reduce refresh calls and you won't have duplicate code in each of the various controls.
>
>HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform