In the IDE when I select a form's TEXTBOX control, click its “Events” tab to add code to its OnChange event then an “OnChange” .PRG is added. However, this .PRG is specific to that control. If I attempt to add it to another TEXTBOX control I get error, “Module Already in Project. Aborted”.
The issue: I have a form with over 20 TEXTBOX controls. I want one single (generic) function called by the OnChange event in all of these TEXTBOX controls. That is, I want to avoid 20 duplicate “OnChange” .PRGs unnecessarily cluttering the project.
Question: Is there a simply way to generically handle all of these OnChange events using one single function?
I would appreciate your kind guidance on how this is best accomplished in HMG.
Thank you, Red2
OnChange Event Question
Moderator: Rathinagiri
Re: OnChange Event Question
You can assign this defined function to this event without creating new .prg. Don't use plus button, simply type your function name with parameters
-
- Posts: 273
- Joined: Sat May 18, 2019 2:11 pm
- DBs Used: Visual FoxPro, FoxPro
- Location: United States of America
Re: OnChange Event Question
Hi mol,
Thank you very much. That was so obvious and simple but I missed it.
Thanks again!
Red2
Thank you very much. That was so obvious and simple but I missed it.
Thanks again!
Red2