Your full service technology partner! 
-Collapse +Expand
Search Delphi Group:

-Collapse +Expand Delphi To/From
-Collapse +Expand Delphi Store

Prestwood eMagazine

January Edition
Subscribe now! It's Free!
Enter your email:

   ► KBProgrammingDelphi for W...Using Controls   Print This     

All Groups:

Next Random Article Next Random Tidbit || Narrow Topic

Random Tidbit

Part of the mo. lesson in the Oct 15 Issue of Prestwood eMag
Delphi Q&A Flashcard:
 A flashcard from our Delphi Flashcards Library
 A FAQ from our Delphi FAQ Page
TEdit OnChange events


I have a form with two TEdit components on it. For the OnChange event for both, it clears the contents of the TEdit that is not changing. However, when clearing on TEdit the OnChange fires and clears the other TEdit, this then causes the OnChange in the other TEdit to fire. Fortunately, the second time the OnChange hits the original TEdit, it is already clear and nothing happens. How can I prevent the circular event firing?


The simplest way to prevent the circular event firing is to check the form's ActiveControl property. This property indicates which component currently has the focus.

The OnChange event should read as follows:

procedure TForm1.EditChange(Sender: TObject);
if TEdit(Sender).Name <> TEdit(ActiveControl).Name then
       // do processing


Share a thought or comment...
Comment 1 of 2

Question need all answers. If you have the answers of all of these questions then you have to come and tell me some more which is just do more at the time when we are write my assignment for me so must leave answers of these questions.

Posted 20 months ago

Comment 2 of 2

 What do you advise your consumers for in the first some weeks after they start utilizing your goods? From: essay writer of UK Writing Experts.

Posted 10 months ago
Write a Comment...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1194A1
Enter key:
FAQ Contributed By Larry J. Rutledge :
I worked for Prestwood Software as a Delphi developer from 1997 through 2002. During that time I enjoyed working with Mike Prestwood and the other developers at Prestwood.
Visit Profile

 KB Article #101671 Counter
Since 12/9/2008
Sales Website: Or visit our legacy sales site:

©1995-2022 Prestwood IT Solutions.   [Security & Privacy]