0

I am trying to turn off the continuous animation on a progress bar in firemonkey. But I cannot figure out how to find the animation object using FindStyleResource.

T := MyProgressBar.FindStyleResource('floatanimation');
if (T <> nil) and (T is TFloatAnimation) then
  TFloatAnimation(T).Loop := false;

In the above code T is always nil. Any suggestion on were I am going wrong with this is greatly appreciated.

Martin

Martin
  • 815
  • 8
  • 21
  • Why do you expect the control to have a style resource with that particular name and type? Do you have some way of browsing the style resources at run time? – Rob Kennedy Mar 27 '13 at 12:16
  • Not at runtime but at designtime I can find the animation in the style for the progress control. – Martin Mar 27 '13 at 20:33

0 Answers0