Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I add some code to multiple methods
Message
De
14/10/2003 10:31:09
 
 
À
14/10/2003 10:12:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00838523
Message ID:
00838530
Vues:
18
I would build a "builder" fior this purpose. something like:
LOCAL i, laObj(1), loObj as TextBox, lcmethods

FOR i = 1 TO =ASELOBJ(laObj)
  IF laObj(i).baseclass = 'Textbox'
    loObj = laObj(i)
    lcmethods = loObj.ReadMethod('InteractiveChange')
    lcMethods = 'm_fieldmodified = .T.'+CHR(13)+CHR(10)+lcmethods
    loObj.WriteMethod('Interactivechange',lcmethods,.t.)
  ENDIF 
ENDFOR
You would select all textboxes on the page and then run this program.

USE AT YOUR OWN RISK. Back up your form to a safe place first. This code was not tested and your results may vary!

Good luck

Glenn

>I have a VFP 8 multiple page pageframe that contains about 100 text boxes. I want to stick in a line of code, "m_fieldmodified=.T.", in the interactivechange event of each text box. Many of the text boxes already have text in the interactive change event. Is there a quick way of doing this?
>
>Thanks,
>
>Vim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform