Links
EControl Syntax Editor SDK
TecMemoStateStorage Class

TecMemoStateStorage stores runtime state (caret position, scroll position, bookmarks, markers, user ranges...) of the editor.

TecMemoStateStorage = class(TComponent);

ecSyntMemo

It is intended to help when using single editor and multiple text storages. 

For example, multi-file editor application may be designed with single editor control and multiple text storage (one per file) to keep system resources. In this case, runtime state of the editor will be lost after each switching between files. TecMemoStateStorage is designed to resolve this problem. This component should be created for each instance of the text source. So when switching between text sources you may save runtime state of the previous file and restore runtime state of the current file. 

 

Use Assign method to save and restore runtime state of the editor, for example:

// saving runtime state
ecMemoStateStorage.Assign(SyntaxMemo1);
...
// restoring runtime state
SyntaxMemo1.Assign(ecMemoStateStorage)
Topic 
Description 
The methods of the TecMemoStateStorage class are listed here. 
The properties of the TecMemoStateStorage class are listed here. 
 
Method 
 
virtual 
 
Property 
TecMemoStateStorage Methods 
Description 
Copies runtime state from other state storage of from the editor. 
Creates and initializes a TecMemoStateStorage instance. 
Destroys an instance of TecMemoStateStorage. 
TecMemoStateStorage Properties 
Description 
Saved bookmarks. 
Saved caret position. 
Saved list of collapsed ranges. 
Saved disable folding property. 
Saved markers list. 
Saved modified state. 
Saved replace mode property. 
Saved scrolling position. 
Saved columnar selection. 
Saved selection mode. 
Saved selection range. 
Saved user ranges. 
Saved word wrap mode. 
Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!