Skip to content

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.

MemberDescription
RecordShortCutThe key that starts and stops the recording.
PlaybackShortCutThe key that plays the macro.
SaveMarkerPosSaves the position of the markers during the recording.
StatemsStopped, msRecording, msPlaying or msPaused.
RecordMacro(Editor), PlaybackMacro(Editor)Start recording and playing from your code.
Stop, Pause, ResumeControl of the recording or playback.
IsEmpty, Clear, AsStringThe recorded macro, that can also be saved and loaded (SaveToStream, LoadFromStream).
OnStateChangeFired when the state changes (to update the buttons).
OnUserCommandLets 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).

MemberDescription
EditorThe editor served.
EnabledEnables the correction.
ItemsThe list of the pairs original / correction (Add(AOriginal, ACorrection)).
ItemSepCharThe separator between the original and the correction in the items (default a tab).
OptionsSet of options of the correction: by default ascoIgnoreCase and ascoMaintainCase.
AutoCorrectAllCorrects all the text.
OnAutoCorrect, OnCorrectedEvents 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.

MemberDescription
EditorThe editor served.
URIHighlighterThe 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).
CtrlActivatesLinksThe 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.

MemberDescription
EditorThe editor served.
IndentThe 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.

Released under the MPL 1.1 / GPL 2 dual license.