Hope this is enlightening for your question. 
I made some tests with Delphi7 and Delphi5, and looked in the online
help:

Ttrackbar onchange:
-----------------------------------------
Occurs immediately after the value of Position changes (user and
program). 
I noted that on user input onchange event is fired twice

Tmemo/Tedit onchange:
-----------------------------------------
Occurs when the text for the edit control may have changed.
TCustomedit has a "modified" property that becomes true if the user
changed the text value so in the onchange event we can choose the action
to do in this case, if application changed the value the modified
property is false.

example:
procedure TForm1.Edit1Change(Sender: TObject);
begin
  if edit1.modified
        then {user input}
        else {app change}
end;

Note that in lazarus, (vers. 0.9.14 beta, 02/04/06, SVN rev. 9061 for
windows) not only {app change} never occurr (and this is IMO is a bug) 
Please also note that the onchange event is also fired on form creation
(or activation, don't know exactly).

Tcustomcombo onchange:
-----------------------------------------
Occurs when the user changes the text displayed in the edit region.
Note: OnChange only occurs in response to user actions. Changing the
Text property programmatically does not trigger an OnChange event.

The matter is interesting and should be examined eve with other
controls. 

bye
tiziano

> -----Original Message-----
> From: Mattias Gaertner [mailto:[EMAIL PROTECTED] 
> Sent: Monday, May 08, 2006 10:27 AM
> To: lazarus@miraclec.com
> Subject: Re: [lazarus] Philosophical question: what should 
> trigger OnChange?
> 
> On Sat, 06 May 2006 13:26:44 +0200
> Giuliano Colla <[EMAIL PROTECTED]> wrote:
> 
> > Re-checking the patch I sent yesterday for Qt interface 
> TMemo, I saw 
> > that I'm not sending an OnChange Event when the TMemo is 
> 
> IMHO we need both.
> For Delphi compatibility we should follow the VCL behaviour here.
> Maybe a Delphian can test and tell us.
> 
> 
> Mattias
> 
> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
> 
###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to