Options Dialog
TSynEditOptionsDialog (unit SynEdit.OptionsDialog) is a ready-made dialog that lets the user of your application configure an editor: options, gutter, fonts, colors and key bindings.
How it works
The dialog does not work directly on the editor, but on a container of settings, TSynEditorOptionsContainer (unit SynEdit.MiscClasses): you copy the settings of the editor into the container, run the dialog and, if the user confirms, copy them back.
pascal
uses
SynEdit.OptionsDialog, SynEdit.MiscClasses;
procedure TForm1.ActionOptionsExecute(Sender: TObject);
var
Options: TSynEditorOptionsContainer;
begin
Options := TSynEditorOptionsContainer.Create(Self);
try
Options.Assign(SynEdit1); // from the editor to the container
if SynEditOptionsDialog1.Execute(Options) then
SynEdit1.Assign(Options); // from the container to the editor
finally
Options.Free;
end;
end;Properties
| Property | Description |
|---|---|
UseExtendedStrings | Shows the extended descriptions of the options. |
GetUserCommand | Event to give the names of your own commands (ecUserFirst...), so that they can be bound to keys in the dialog. |
GetAllUserCommands | Event to give the list of your own commands. |
Related dialogs
| Unit | Dialog |
|---|---|
SynEdit.KeyCmdsEditor | Editor of the key bindings (Keystrokes). |
SynEdit.KeyCmdEditor | Editor of a single key binding. |
SynEdit.FHighlightProp | Editor of the attributes of a highlighter (colors, styles) with a preview. |
SynEdit.OmniSetupDialog | Setup of the TSynOmniSyn highlighter. |
