All Blog Posts  |  Next Post  |  Previous Post

Revealing a new chat component for Delphi


Tuesday, February 7, 2023

We recently released a new update of TMS FNC UI Pack v5.0 introducing the syntax highlight memo. But that's not all, alongside quite a significant amount of fixes and improvements, we also added a second new component: TTMSFNCChat, a component capable of displaying chat messages in a typical left/right layout, with lots of customization options. Here is an overview of the most important features. No, this blog is not written by ChatGPT. It's written by someone who puts lots of effort and care in components and blog posts, to be enjoyed by you: our valuable customer. 

Based on a TTMSFNCTableView

The TTMSFNCChat is based on the TTMSFNCTableView, it exposes a set of features already available such as the look & feel of the items, touch scrolling and many more. In the object inspector, you'll see properties related to TTMSFNCTableView classes. Additionally, there are a couple of events exposed for customization of the messages.

TMS Software Delphi  Components

Left / right look and feel

When dropping the TTMSFNCChat on the form, you'll notice that there is a sample discussion with left and right messages. The default properties to control a message are separated in the DefaultLeftItem & DefaultRightItem properties. Additionally, you can configure each message separately.

TMS Software Delphi  Components

Built-in editor with attachment button

Included in the TTMSFNCChat is a ready to use built-in editor with optional attachment button. The additional button calls a separate event, and allows you to implement code to pick a file, such as with the TOpenDialog. The editor automatically takes on the height of the text when typing.

TMS Software Delphi  Components

Image/File support

The TTMSFNCChat has support for automatically adding images and files. The first code snippet adds an image of a car logo.

TMSFNCChat1.AddImage('Alfa Romeo.png', 'Hi did you see my new car? It''s an Alfa Romeo', cmlLeft);

TMS Software Delphi  Components

The second code snippet adds a file, the file name and a message.

TMSFNCChat1.AddFile('MyDrive:\path\Meeting.docx', 'Meeting.docx', 'Hi, attached is a summary of our meeting from this morning', cmlLeft);

TMS Software Delphi  Components

Clicking on the file URL will automatically open the file.

Emoticon support

Typing a message with emoticon shortcuts will automatically detect and convert them. There is a basic set that's supported for automatic conversion, the others are based on the operating system. Currently, FMX will convert them to actual images. VCL will render them as characters in the same font size, color and name.

TMS Software Delphi  Components

What's next?

Here at TMS, we are hard at work at the next set of features for the following component sets: TMS FNC UI Pack, TMS FNC Cloud Pack & TMS FNC Maps. Stay tuned for more!

Pieter Scheldeman


This blog post has received 3 comments.

1. Tuesday, February 7, 2023 at 10:58:37 PM

Excellent! thanks, I''ll give it a try.
Do it support audio/video ?

Espejel Tafoya Job

2. Wednesday, February 8, 2023 at 8:34:01 AM


No, there is no audio or video support. We''ll investigate the possibilities

Pieter Scheldeman

3. Tuesday, October 31, 2023 at 5:52:01 AM

Is there an option to format program code within the chat item (highlighting)?

Ariel Halasz

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