[Demo] Chat codes
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
[Demo] Chat codes
1. Simple demo
http://www.trichview.com/support/files/chatcodes.zip
This demo shows how to add text with some codes:
\b - bold on/off
\i - italic on/off
\u - underline on/off
\cRRGGBB - text color
\kRRGGBB - text background color
2. Advanced demo with plain text input This demo has almost complete ready-to-use chat window functionality.
In addition to the demo above, it supports the commands:
\f"FONTNAME" - changes font name
\sNN - changes font size to NN points (it's also possible to use one digit \sN followed by non-digit character; if this character is a space, it is not displayed)
This demo supports:
- Emoticons. They can be easily customized, just modify CreateEmoticons procedure. In this demo, bitmaps are used, but you can easily change them to animated gifs.
- URL detection
- message preview as you type.
3. Advanced demo with rich text text input This demo uses the same commands as the demo above, but the message is typed in TRichViewEdit instead of TEdit.
The demo converts the message to a string (using the codes described above), then this string is parsed and added to the chat window.
See also:
- Contact list demo http://www.trichview.com/forums/viewtopic.php?p=12608
http://www.trichview.com/support/files/chatcodes.zip
This demo shows how to add text with some codes:
\b - bold on/off
\i - italic on/off
\u - underline on/off
\cRRGGBB - text color
\kRRGGBB - text background color
2. Advanced demo with plain text input This demo has almost complete ready-to-use chat window functionality.
In addition to the demo above, it supports the commands:
\f"FONTNAME" - changes font name
\sNN - changes font size to NN points (it's also possible to use one digit \sN followed by non-digit character; if this character is a space, it is not displayed)
This demo supports:
- Emoticons. They can be easily customized, just modify CreateEmoticons procedure. In this demo, bitmaps are used, but you can easily change them to animated gifs.
- URL detection
- message preview as you type.
3. Advanced demo with rich text text input This demo uses the same commands as the demo above, but the message is typed in TRichViewEdit instead of TEdit.
The demo converts the message to a string (using the codes described above), then this string is parsed and added to the chat window.
See also:
- Contact list demo http://www.trichview.com/forums/viewtopic.php?p=12608
Last edited by Sergey Tkachenko on Thu Apr 15, 2010 12:17 pm, edited 7 times in total.
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
The new version with new \f"FONTNAME" command:
http://www.trichview.com/support/files/chatcodes2.zip
http://www.trichview.com/support/files/chatcodes2.zip
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
http://www.trichview.com/support/files/chatcodes2.zip is updated, see the first post in this topic.
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Sorry, I never worked with youtube video.
If you know a control that can play youtube video, you can insert it in TRichView.
I believe you can use Flash ActiveX, loading Chromeless Player in it. (apiplayer.SWF): http://code.google.com/apis/youtube/chr ... l#Overview
If you know a control that can play youtube video, you can insert it in TRichView.
I believe you can use Flash ActiveX, loading Chromeless Player in it. (apiplayer.SWF): http://code.google.com/apis/youtube/chr ... l#Overview
This demo breaks with D2009
This demo breaks with Delphi 2009. Specifically it looks like the AddStringWithURLs is doing math as 1 byte characters.
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: