Animate Example for Delphi

This example shows how the Animate event can be used to toggle the use of a button to start and stop the animation.

procedure TForm1.Button1Click(Sender: TObject);
begin
   if (LEADRasterView1.AnimationEnable = True) then
     LEADRasterView1.AnimationEnable := False
   else
     LEADRasterView1.AnimationEnable := True;
end;

procedure TForm1.LEADRasterView1Animate (Sender: TObject;
  bEnable: WordBool);
begin
   if bEnable = True Then
      Button1.Caption:= '&Stop Animation'
     else
      Button1.Caption := '&Start animation';
end;