Página 1 de 1

TMemo doesn't recognize the OnChange event

Publicado: Mié May 30, 2007 3:44 pm
por Gejza Horvath
I'm using the OnChange event of the TMemo control. It works fine, when the control Value
is changed manually (editing, Cut and Paste operation). When the Value is changed by code
like this:
oMemo1:Value := ""
oMemo1:Clear()
the event is not reached.
Please correct this inconsistence.
Gejza Horvath

TMemo doesn't recognize the OnChange event

Publicado: Mié May 30, 2007 5:39 pm
por ignacio
Gezja,
That is the correct behaviour. OnChange is only triggered when is done by
the end user, not by code. In order to force it, just call it:
oMemo:OnChange()
Regards,
"Gejza Horvath" <_hsoftkn@nextra.sk> escribió en el mensaje
news:[email=465d8025@ozsrv2.ozlan.local...]465d8025@ozsrv2.ozlan.local...[/email]
> I'm using the OnChange event of the TMemo control. It works fine, when the
> control Value is changed manually (editing, Cut and Paste operation). When
> the Value is changed by code like this:
>
> oMemo1:Value := ""
> oMemo1:Clear()
>
> the event is not reached.
>
> Please correct this inconsistence.
>
> Gejza Horvath
>