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...
ANI-GIF -vs- dynamik RV ?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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);
...
sky...
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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).
)
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).
)