Getting Started with TMS FNC Chat
TTMSFNCChat is a chat UI control built on TTMSFNCTableView. It supports text messages, images, file attachments, timestamps, pull-to-refresh, and a customisable send button.
Prerequisites
- Delphi with TMS FNC UI Pack installed.
- A VCL, FMX, or WEB application.
Steps
1. Drop the component
Drop a TTMSFNCChat onto a form.
2. Enable the message field
TMSFNCChat1.ShowMessageField := True;
This shows a text input and send button at the bottom. Users can type and press Enter or click Send.
3. Add messages in code
TMSFNCChat1.AddMessage('Hello!', cmlRight);
TMSFNCChat1.AddMessage('Hi there!', 'Alice', cmlLeft);
4. React to sent messages
procedure TForm1.TMSFNCChat1AfterSendMessage(Sender: TObject;
AText: string);
begin
// AText contains the message that was just sent
end;