Animate Event Example for C++ Builder
This example shows how the Animate event can be used to toggle the use of a button to start and stop the animation.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
if (LEADRasterView1->AnimationEnable)
LEADRasterView1->AnimationEnable= False;
else
LEADRasterView1->AnimationEnable = True;
}
void __fastcall TForm1::LEADRasterView1Animate (TObject *Sender,
TOLEBOOL bEnable)
{
if (bEnable)
Button1->Caption= "&Stop Animation";
else
Button1->Caption= "&Start animation";
}