why i insert a gif image,but it can't be active?
my code is like this:
gif:=TGifImage.Create;
gif.LoadFromFile('0020.gif');
rich.InsertPicture('0020.gif',gif,rvvaBaseLine);
rich.Format;
gif image
-
- Site Admin
- Posts: 17604
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
1) Include RVGifAnimate unit in the project or in the uses clause of one of your units
2) Set rich.AnimationMode=rvaniOnFormat
And do not call Format after Insert*** methods. They are editing-style methods, they reformat the changed part of document themselves.
In this case, Format only slows down the execution, and moves caret to the beginning of the document.
2) Set rich.AnimationMode=rvaniOnFormat
And do not call Format after Insert*** methods. They are editing-style methods, they reformat the changed part of document themselves.
In this case, Format only slows down the execution, and moves caret to the beginning of the document.
i don't have this unit,and the commpnent doesn't have the property name AnimationMode,Why?Sergey Tkachenko wrote:1) Include RVGifAnimate unit in the project or in the uses clause of one of your units
2) Set rich.AnimationMode=rvaniOnFormat
And do not call Format after Insert*** methods. They are editing-style methods, they reformat the changed part of document themselves.
In this case, Format only slows down the execution, and moves caret to the beginning of the document.
-
- Site Admin
- Posts: 17604
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
why it can't move?!Sergey Tkachenko wrote:Update it to the newer version
uses GIFImage, RVAnimate;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
gif:TGIFImage;
begin
rich.AnimationMode:=rvaniOnFormat;
gif:=TGifImage.Create;
gif.LoadFromFile('0020.gif');
rich.InsertPicture('0020.gif',gif,rvvaBaseLine);
end;
i have updated!
-
- Site Admin
- Posts: 17604
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
it's not working... for example:
if i set AnimationMode to "rvaniOnFormat" in Object Inspector - that's ok, but what should i do, when i need to create RichView "on the fly"?
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
var
gif: TGifImage;
begin
gif := TGIFImage.Create;
gif.LoadFromFile('d:\1.gif');
RichView1.AnimationMode := rvaniOnFormat;
RichView1.AddPictureExTag('', gif, -1, rvvaBaseline, 1);
RichView1.FormatTail;
end;
-
- Site Admin
- Posts: 17604
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: