How to replace Text with Animated Gif Image

General TRichView support forum. Please post your questions here
Post Reply
Kassit
Posts: 10
Joined: Sat Jan 24, 2009 12:25 pm
Location: Iran (Islamic Republic Of)
Contact:

How to replace Text with Animated Gif Image

Post by Kassit »

I want to replace a text with image in RichView.

I save formatted text of RichViewEdit into stream. therefore i want to replace something like "[img]" in text with animated gif logo and then insert it into RichView.

if found a source code that is for replacing text with image in RichViewEdit :

Code: Select all

procedure ReplaceImages;
   procedure SearchAndInsertIcon(const Code: String; ImageIndex: Integer);
   begin
      RVE.SetSelectionBounds(0, RVE.GetOffsBeforeItem(0), 0, RVE.GetOffsBeforeItem(0));
      while RVE.SearchText(Code, [rvseoDown]) do
         RVE.InsertBullet(ImageIndex, ImageList1);
   end;
begin
    SearchAndInsertIcon(':)', 0);
    SearchAndInsertIcon(':|', 1);
    SearchAndInsertIcon(':(', 2);
end;
but there is two problems:
1- that's for replacing in RichViewEdit not RichView
2- It load images from TImageList so it impossible to insert animated gif images. ImageList just loads bitmap and icons
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

If you want to implement a chat window, look here:
http://www.trichview.com/forums/viewtopic.php?t=63
Kassit
Posts: 10
Joined: Sat Jan 24, 2009 12:25 pm
Location: Iran (Islamic Republic Of)
Contact:

Post by Kassit »

I'd looked at that before.

It's not very satisfied to adding some characters to viewable texts by users like "\u". in addition it is not possible to apply style to the selected text in that example.

also the problem to showing animated Gif will not solve
Post Reply