How to perform auto-replace when modified?

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by Peter Luo - AIMNEXT
Version: 4.0.0285
Avatar
Hi,

I want to auto-replace the full shape space with half shape space while typing, I tried
the AutoReplaceTrigger like this:
AutoReplaceTrigger arTrigger = new AutoReplaceTrigger("FullSpace", new CharClass(' ')); //Full shape space, but this one will be the trigger
arTrigger.ValidLexicalStates.Add(this.DefaultLexicalState);
this.Triggers.Add(arTrigger);

this.AutoReplace.Add(new AutoReplaceEntry(" ", " ")); //First argument is full shape space, and the second one is half shape.
I must type two full half space, and the first one will be replaced, the second one will not(it is the trigger char). Can I replace it immediately while typing?

Thanks a lot.

[Modified at 11/05/2010 02:10 AM]

Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Peter,

I would expect it to replace the one right before where you type. Please put together a simple sample project that shows this and email it over. Rename the ZIP file so that it won't get blocked and don't include any .exe files in it.

It would be helpful for debugging purposes if you could perhaps use characters like 'a' and 'b' instead of half and full spaces since the half spaces are harder to type, but you probably would see the same issue regardless of which characters you use.


Actipro Software Support

The latest build of this product (v24.1.1) was released 28 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.