Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I add some code to multiple methods
Message
From
14/10/2003 10:31:09
 
 
To
14/10/2003 10:12:41
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00838523
Message ID:
00838530
Views:
17
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
Previous
Reply
Map
View

Click here to load this message in the networking platform