Getting started
Requirements
- Delphi 10.1 Berlin or later
- TMS FNC Core (required dependency)
- TMS FNC UI Pack
Drop a toolbar
- Drop one of the toolbars — for example
TTMSFNCFontToolBar— onto a form. - Set its
Controlproperty to the rich editor it should drive. - The toolbar builds its buttons automatically and keeps them in sync with the editor's selection; handle the toolbar's events to react to user actions.
Minimal example
Connect a font toolbar to an editor. The bar's buttons immediately reflect and apply formatting to the bound control:
// Connect a TTMSFNCFontToolBar to a TTMSFNCRichEditor via the Control property.
// The toolbar reads and applies font changes directly to the editor.
procedure TForm1.FormCreate(Sender: TObject);
begin
TMSFNCFontToolBar1.Control := TMSFNCRichEditor1;
TMSFNCParagraphToolBar1.Control := TMSFNCRichEditor1;
TMSFNCInsertToolBar1.Control := TMSFNCRichEditor1;
TMSFNCClipboardToolBar1.Control := TMSFNCRichEditor1;
TMSFNCFileIOToolBar1.Control := TMSFNCRichEditor1;
end;
Next steps
- Connecting toolbars to an editor — the five toolbars and the
Controlproperty - Formatting toolbars — font and paragraph options, events and state
- Action toolbars — clipboard, insert and file I/O
- Appearance and layout — styling, compact mode and the options menu