Page 1 of 1
gif image
Posted: Thu Sep 08, 2005 9:17 am
by gcw5zb
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;
Posted: Thu Sep 08, 2005 8:36 pm
by Sergey Tkachenko
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.
Posted: Fri Sep 09, 2005 6:43 am
by gcw5zb
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.
i don't have this unit,and the commpnent doesn't have the property name AnimationMode,Why?
Posted: Fri Sep 09, 2005 7:17 am
by Sergey Tkachenko
Update it to the newer version
Posted: Fri Sep 09, 2005 7:43 am
by gcw5zb
Sergey Tkachenko wrote:Update it to the newer version
why it can't move?!
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!
Posted: Fri Sep 09, 2005 10:04 am
by Sergey Tkachenko
Add RVGifAnimate in "uses", not RVAnimate.
Posted: Mon Jan 09, 2006 5:55 am
by xa0c
it's not working... for example:
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;
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"?
Posted: Thu Jan 12, 2006 8:12 pm
by Sergey Tkachenko
For the initial formatting (and for the first formatting after calling Clear) use Format. Use FormatTail only if you added additional lines.