EControl Syntax Editor SDK
ecAutoReplace.TOnAutoReplaceEvent Type

TOnAutoReplaceEvent is the type for event that occurs before substring in SyntMemo text is auto-replaced.

TOnAutoReplaceEvent = procedure (APos: integer; const AWord: ecString; var AReplace: ecString; var Accept: Boolean) of object;


This event may be used by the user to change AReplace before replacement. It's useful, for instance, when it's necessary to replace not a single word or word combination but a multiline string. 

APos is a current zero-based position in SyntMemo text. 

AWord is a string that might be replaced. 

AReplace is a string that might replace AWord in SyntMemo text. 

Accept indicates whether replace can be done.

Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!