Editing Helpers
Small components that add a behavior to a TSynEdit. Each of them has an Editor property (some can serve more editors).
TSynMacroRecorder
Unit: SynEdit.MacroRecorder. Records the keystrokes and commands of an editor and plays them back.
| Member | Description |
|---|---|
RecordShortCut | The key that starts and stops the recording. |
PlaybackShortCut | The key that plays the macro. |
SaveMarkerPos | Saves the position of the markers during the recording. |
State | msStopped, msRecording, msPlaying or msPaused. |
RecordMacro(Editor), PlaybackMacro(Editor) | Start recording and playing from your code. |
Stop, Pause, Resume | Control of the recording or playback. |
IsEmpty, Clear, AsString | The recorded macro, that can also be saved and loaded (SaveToStream, LoadFromStream). |
OnStateChange | Fired when the state changes (to update the buttons). |
OnUserCommand | Lets you record your own commands. |
TSynAutoCorrect
Unit: SynEdit.AutoCorrect. Replaces a word with its correction while the user types (for example teh with the, or an abbreviation with the full text).
| Member | Description |
|---|---|
Editor | The editor served. |
Enabled | Enables the correction. |
Items | The list of the pairs original / correction (Add(AOriginal, ACorrection)). |
ItemSepChar | The separator between the original and the correction in the items (default a tab). |
Options | Set of options of the correction: by default ascoIgnoreCase and ascoMaintainCase. |
AutoCorrectAll | Corrects all the text. |
OnAutoCorrect, OnCorrected | Events before and after a correction: the first one can change or cancel it. |
The unit SynEdit.AutoCorrectEditor contains a form to edit the list of the corrections.
TSynURIOpener
Unit: SynEdit.URIOpener. Makes the links of the text (web addresses, mail) clickable.
| Member | Description |
|---|---|
Editor | The editor served. |
URIHighlighter | The TSynURISyn highlighter that finds the links. It must be assigned to the editor (alone, or inside a TSynMultiSyn to find the links in the comments of the code). |
CtrlActivatesLinks | The link is opened with Ctrl+click (default True). |
VisitedURI(URI) | Tells whether a link has already been opened. |
TSynEditPythonBehaviour
Unit: SynEdit.PythonBehaviour. Gives the editor the indentation of the Python code: after a line that ends with a colon the next line is indented.
| Member | Description |
|---|---|
Editor | The editor served. |
Indent | The number of spaces of the indentation (default 4). |
TSynHighlighterManager
Unit: SynEdit.Highlighter.Manager. A design-time helper: when you drop it on a form it shows the list of the highlighters and places on the form those you select.
