<< Click to display table of contents >> How to create a chat window |
You can find the complete demo of a chat window on the support forum: https://www.trichview.com/forums/viewtopic.php?t=63
This demo shows how to implement a chat window with the following features. The user types a plain text message in TEdit. This message can contain special commands, they are processed before displaying in TRichView window.
This demo supports:
▪text commands;
▪emoticons;
▪URL detection.
Examples of text commands:
▪\b to make text bold (toggle);
▪\cRRGGBB to change text color.
Emoticons are easily customizable (their codes and graphics are stored in arrays). This demo uses bitmaps, but you can change them to Gif images (see how to use third-party graphic classes), including animations. For additional ideas about emoticons, see the demo in Demos\*\Assorted\Graphics\Emoticons\.
URL detection use RVIsURL and RVIsEmail functions. You can use RVIsCustomURL to define your own types of links.