Links
EControl Syntax Editor SDK
TSyntAutoReplace Class

Implements auto-replace operations for Syntax Memo.

TSyntAutoReplace = class(TSyntMemoPlugin, IUnknown, IecTextClient, IecCommandHook);

ecAutoReplace

Auto-replace replaces words that are specified in Items during text input. You can also specify CorrCurCmd or CorrAllCmd commands to enable user to manually invoke corrections. 

CorrectAll method is also used for manual corrections. 

By default auto-replace localizes words as substrings between "non-word" characters. But it's not common for different computer languages. User may redefine "word" characters by overriding virtual IsLegalChar method or using OnCheckChar event. 

To control auto-replace operations use OnAutoReplace event.

Topic 
Description 
The methods of the IecCommandHook class are listed here. 
IecTextClient Interface
Topic 
Description 
The methods of the IecTextClient class are listed here. 
TSyntMemoPlugin Class
Topic 
Description 
The properties of the TSyntMemoPlugin class are listed here. 
TSyntAutoReplace Class
Topic 
Description 
The methods of the TSyntAutoReplace class are listed here. 
The properties of the TSyntAutoReplace class are listed here. 
The events of the TSyntAutoReplace class are listed here. 
 
Method 
 
protected 
 
virtual 
 
Property 
 
Event 
TSyntAutoReplace Class
TSyntAutoReplace Class 
Description 
Occurs before substring in SyntMemo text is auto-replaced. 
Occurs after checking some character whether it is a word character. 
IecCommandHook Methods 
Description 
Called after execution in syntax memo. 
Called before execution in syntax memo. 
Called to test wether command is enabled. 
IecTextClient Interface
IecTextClient Interface 
Description 
Called after text have been changed. 
TSyntAutoReplace Class
TSyntAutoReplace Class 
Description 
This is AfterCommand, a member of class TSyntAutoReplace. 
This is BeforeCommand, a member of class TSyntAutoReplace. 
Replaces all words. 
 
Replaces a word at current caret position. 
Creates and initializes a TSyntAutoReplace instance. 
Destroys an instance of TSyntAutoReplace. 
Replaces substring in SyntMemo text with AReplace string and calls OnAutoReplace event. 
Finds AWord string in Items and returns a corresponding auto-replace string in AReplace. 
This is IsCommandEnabled, a member of class TSyntAutoReplace. 
Checks whether C is a "word" char. 
This is TextChanged, a member of class TSyntAutoReplace. 
TSyntMemoPlugin Class
TSyntMemoPlugin Class 
Description 
Identifies the SyntaxMemo component associated with the TSyntMemoPlugin object. 
TSyntAutoReplace Class
TSyntAutoReplace Class 
Description 
Defines regular expression. 
Allows case consistency replaces. 
Defines Correct All command. 
Defines Correct Current command. 
Defines whether automatic replace on text change is enabled. 
Defines whether case is ignored while searching for a Replace in Items
Contains auto-replace items. 
Allows maintain case replaces. 
Defines the separator in the Items property. 
Defines whether smart auto-replace is enabled. 
Identifies the SyntaxMemo component associated with the TSyntAutoReplace object. 
Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!