Blog

All Blog Posts  |  Next Post  |  Previous Post

Integrate our new Ready-to-Use, Word-Inspired Toolbars across FMX, VCL and WEB Core!

Thursday, December 12, 2024

The latest TMS FNC UI Pack release introduces a set of versatile toolbars that can be seamlessly integrated with any component, enabling developers to enhance their applications with rich functionality. These toolbars are independent of specific components, providing flexibility and reusability across diverse use cases.

TMS Software Delphi  Components

Overview of the new Toolbars

This release includes five component-independent toolbars designed to streamline common text formatting, editing, and file operations:

  1. Font Toolbar: For text styling and font management.
  2. Paragraph Toolbar: Focused on text alignment and structural formatting.
  3. Insert Toolbar: Adds elements such as hyperlinks and images to the content.
  4. Clipboard Toolbar: Handles essential copy-paste operations.
  5. FileIO Toolbar: Simplifies file handling, including open and save operations.

These toolbars are not bound to specific components, making them suitable for a wide range of applications, from simple text editors to complex document management systems.

Detailed Features of Each Toolbar

Font Toolbar

TMS Software Delphi  Components

The Font Toolbar provides tools for customizing text appearance, including:

  • Font Family: Select from a variety of fonts to suit different contexts.
  • Font Size: Adjust text size for better readability or emphasis.
  • Text Color and Background Color: Apply colors to text and background to highlight or differentiate sections.
  • Text Style Options: Toggle Bold, Italic, Underline, and Strike-through styles to add emphasis or indicate changes.

Paragraph Toolbar

TMS Software Delphi  Components

This toolbar facilitates text organization and alignment, offering:

  • Bullets and Numbering: Create structured lists with ease.
  • Indentation: Increase or decrease text indentation for better layout control.
  • Alignment Options: Align text to the left, center, right, or justify it for a polished look.

Insert Toolbar

TMS Software Delphi  Components

The Insert Toolbar enables the inclusion of additional elements, such as:

  • Hyperlinks: Embed clickable links in text.
  • Bitmaps: Insert and display images to enhance content.

Clipboard Toolbar

TMS Software Delphi  Components

This toolbar simplifies basic clipboard operations, which include:

  • Cut, Copy, and Paste: Essential tools for moving and duplicating text or elements within the application.

FileIO Toolbar

TMS Software Delphi  Components

The FileIO Toolbar aids in file management tasks, such as:

  • Open File: Load existing files for editing.
  • Save File: Save content in the desired format.

  • Save Text: Export plain text files for simplicity and compatibility.

Implementation and Event Handling

Settings

Using the Settings property, you can customize various aspects of the toolbars to reflect the current text settings, ensuring the toolbar accurately represents the properties of the selected content. 

TMS Software Delphi  Components

This can be implemented for a TTMSFNCRichEditor like this: 

procedure TForm6.TMSFNCRichEditor1SelectionChanged(Sender: TObject);
begin
  TMSFNCFontToolBar1.Settings.Font.Family := TMSFNCRichEditor1.GetSelectionFontName;
  TMSFNCFontToolBar1.Settings.Font.Height := TMSFNCRichEditor1.GetSelectionFontSize;
  TMSFNCFontToolBar1.Settings.Font.Color := TMSFNCRichEditor1.GetSelectionTextColor;
  TMSFNCFontToolBar1.Settings.BackgroundColor := TMSFNCRichEditor1.GetSelectionBkColor;
  TMSFNCFontToolBar1.Settings.Bold := TMSFNCRichEditor1.IsSelectionBold;
  TMSFNCFontToolBar1.Settings.Italic := TMSFNCRichEditor1.IsSelectionItalic;
  TMSFNCFontToolBar1.Settings.Underline := TMSFNCRichEditor1.IsSelectionUnderline;
  TMSFNCFontToolBar1.Settings.Strikeout := TMSFNCRichEditor1.IsSelectionStrikeOut;

  TMSFNCParagraphToolbar1.Settings.BulletIndex := Integer(TMSFNCRichEditor1.GetSelectionBullet);
end;

This flexibility allows you to dynamically adjust the toolbars based on user interactions or application context, providing a consistent and intuitive user experience.

Events

Each toolbar is equipped with events that enable developers to customize and link the toolbar's functionality to specific components. This allows for both design-time and runtime integration.

For example, to link the Font Toolbar to a TTMSFNCMemo component, you can handle the ApplyFontName event as follows:

procedure TForm4.TMSFNCFontToolBar1ApplyFontName(Sender: TObject;
  AFontName: string);
begin
  TMSFNCMemo1.Font.Name := AFontName;
end;
This approach ensures that any changes made through the toolbar are immediately reflected in the linked component. Similar events are available for other toolbars, providing comprehensive control over their behavior.

Available Today!

The Toolbar components are available in the latest update, available today. So go ahead and download the latest version of the TMS FNC UI Pack. The TMS FNC UI Pack is part of the FNC family, so as a reminder, below is an overview of what FNC has to offer.

TMS FNC Components can be used simultaneously on these frameworks


TMS FNC Components can be used simultaneously on these operating systems/browsers


TMS FNC Controls can be used simultaneously on these IDEs



Bradley Velghe




This blog post has not received any comments yet.



Add a new comment

You will receive a confirmation mail with a link to validate your comment, please use a valid email address.
All fields are required.



All Blog Posts  |  Next Post  |  Previous Post