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 
> programmatically changed. That is OnChange is generated only on user 
> input on the memo.
> 
> The correction is trivial, just a few lines of code, but the 
> philosophical question arises. Maybe it's already been discussed and 
> settled since a long time, but I'm a newcomer.
> 
> The OnChange event exists only in controls which may be subject to user 
> input, such as TEdit, TMemo, TComboBox TTrackBar and such.
> 
> For some of them it's reasonable to think that the same action which 
> must be taken when the user changes something should also be taken when 
> the program changes it (such as TTrackBar): this saves code.
> 
> For others, as TMemo, TEdit, and perhaps TComboBox, generating the 
> OnChange event when the change comes from the program is IMHO more a 
> nuisance than a feature. In my experience I've always been forced to add 
> code in order to tell apart user input from changes coming from the 
> program. Otherwise unwanted effects and/or unwanted circles are generated.

Me2.

 
> So the philosophical question: is it right to follow Delphi logic for 
> TEdit and TMemo OnChange, or it would be more reasonable to "improve" 
> the matter, and generate OnChange only on user action?

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

Reply via email to