ANI-GIF -vs- dynamik RV ?

General TRichView support forum. Please post your questions here
Post Reply
skydiablo
Posts: 16
Joined: Wed Feb 14, 2007 1:31 pm

ANI-GIF -vs- dynamik RV ?

Post by skydiablo »

hi (sorry for my bad english!)

i have a RV in a class and create the RV on runtime. but now the GIF animations dont work ? i have added the unit "RVJvGifAnimate" in the uses and set fRichView.AnimationMode := rvaniOnFormat ...

whats happend ?

thx & greez, sky...
Sergey Tkachenko
Site Admin
Posts: 17565
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

They must work (if you use TJvGIFImage to add gifs).
Can you send me a simple project reproducing the problem?
skydiablo
Posts: 16
Joined: Wed Feb 14, 2007 1:31 pm

Post by skydiablo »

Code: Select all

uses RVJvGifAnimate;

type
  TMainFormVCL = class(TObject)
    constructor create(aDestination : TCustomForm);
    destructor destroy; override;

  private
    fDestination : TCustomForm;
...
    fRichView : TRichView;
..
    procedure BuildForm;
    procedure KillForm;
...
  public
    property Destination : TCustomForm read fDestination write fDestination;
    property RichView : TRichView read fRichView write fRichView;
...
  end;

...

constructor TMainFormVCL.create(aDestination : TCustomForm);
begin
  fDestination := aDestination;
  BuildForm;
...
end;

destructor TMainFormVCL.destroy;
begin
  KillForm;
end;

procedure TMainFormVCL.BuildForm;
const DefaultBorderBorder : integer = 10;
begin
...
  fPanel8 := TPanel.Create(self.fDestination);
  fPanel8.Parent := self.fDestination;
...

  fPanel7 := TPanel.Create(fPanel8);
  fPanel7.Parent := fPanel8;
...

  fRichView := TRichView.Create(fPanel7);
  fRichView.Parent := fPanel7;
  fRichView.Left := DefaultBorderBorder;
  fRichView.Top := DefaultBorderBorder;
  fRichView.Width := fPanel7.Width - DefaultBorderBorder;
  fRichView.Height := fPanel7.Height - fRichView.Top - DefaultBorderBorder;
  fRichView.Anchors := [akLeft,akTop,akRight,akBottom];
  fRichView.BottomMargin := 5;
  fRichView.AnimationMode := rvaniOnFormat;
...
end;

...
...
...

uses RVJvGifAnimate;

procedure TForm1.FormCreate(Sender: TObject);
begin
  MainFormVCL := TMainFormVCL.create(self);
...
it must be...

sky...
shmp
Posts: 140
Joined: Sun Aug 28, 2005 10:19 am
Location: Sabah, Malaysia.
Contact:

Post by shmp »

TjvGifAnimate (used by RVGifAnimate) and TJvGifImage are two different things. TjvGifAnimate will animate the GIF in TjvGifImage but TjvGifImage will not work alone. Most probably you have not include the jvGifImage in the use section.

Hope this helps.
Sergey Tkachenko
Site Admin
Posts: 17565
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

RichView does not use JVCL gif animation class (TJvGIFAnimator), it animates gifs itself. If you include RvJvGifAnimate unit, you include JvGif unit automatically, because RvJvGifAnimate uses JvGif.

I cannot tell what's wrong by this example. Please send me a simple project that I can compile.
skydiablo
Posts: 16
Joined: Wed Feb 14, 2007 1:31 pm

Post by skydiablo »

hi...

here is a very simple sample with the same problem !

DOWNLOAD

like this i use it now... and no gif animation ?

thx for help !!!

greez, sky...
Sergey Tkachenko
Site Admin
Posts: 17565
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

FormatTail does not start animation.
Call rv.Format after you create TRichView (the last line in TRVExtraUnit.create).

(
one more note:
FormatTail does not format document properly, if items are added to the same paragraph after the last call of Format/FormatTail. So you cannot start Trvaddsmilie.add from adestination.Add. You must start from AddNL with ParaNo parameter >= 0.
Besides, -1 is not a valid value for StyleNo parameter. TRichView replaces it with rvsDefStyle (meaning using default text style for paragraph, 0 by default).
So change adestination.Add('TEST: ',-1) to adestination.AddNL('TEST: ',0,0).
)
Post Reply