Page 1 of 1
Animated Gif
Posted: Tue Aug 16, 2016 4:55 pm
by max.beliy
Is it possible to show gif animation in RV?
Posted: Wed Aug 17, 2016 8:48 am
by Sergey Tkachenko
Yes.
If you use Delphi 2007 or newer, include RVGifAnimate2007 unit in your project
(for older versions, you need to use third-party gif classes)
Also, you can change RichViewEdit.AnimationMode to rvaniOnFormat to start animation automatically.
Posted: Wed Aug 17, 2016 11:02 am
by max.beliy
It works with standart RVE but with cxTRichViewEdit doesn't work
Posted: Wed Aug 17, 2016 11:31 am
by Sergey Tkachenko
I confirm the problem: if you set cxrv.Properties.Properties.AnimationMode = rvaniOnFormat at designtime, it does not work.
Fix: open cxTRichView.pas, find procedure TcxCustomTRichViewEdit.Loaded, change it to:
Code: Select all
procedure TcxCustomTRichViewEdit.Loaded;
begin
inherited;
ShortRefreshContainer(False);
if InnerEditor <> nil then
InnerEditor.Loaded;
end;
This fix will be included in the next update.
Posted: Wed Aug 17, 2016 11:39 am
by max.beliy
Thanks
Posted: Wed Aug 17, 2016 12:18 pm
by max.beliy
But still doesn't work
Posted: Wed Aug 17, 2016 2:12 pm
by Sergey Tkachenko
How do you load the image? The animation is supported if it is loaded as TGifImage, not as DevExpress graphic class (TdxSmartImage)
If you load a gif file using TPicture.LoadFromFile or RVGraphicHandler.LoadFromFile, the most probably, the image is loaded as TdxSmartImage.
You can unregister TdxSmartImage by calling
TPicture.UnregisterGraphicClass(TdxSmartImage);
when the application starts (include dxGDIPlusClasses in "uses").
Posted: Wed Aug 17, 2016 4:17 pm
by max.beliy
Thanks TPicture.UnregisterGraphicClass(TdxSmartImage); Works !
Also in some cases can help moving declaration of dx*** units before:
GifImg, RVGifAnimate2007