重用TFloatAnimation Delphi XE5 [英] Reuse TFloatAnimation Delphi XE5
问题描述
放置一个FloatAnimation按钮和应用程序面板,将按钮onClick放置FloatAnimation1.enabled:= true;并且动画正常运行,但是如果我再次单击该按钮,动画将不会再次运行。即我每次单击按钮时都需要运行FloatAnimation组件,而不仅仅是第一次。
Put a FloatAnimation a button and the application panel, the button onClick put the FloatAnimation1.enabled: = true; and the animation runs normally, but if I click on the button again the animation does not run again. Ie I need the component FloatAnimation run whenever I click the button and not just the first time.
推荐答案
在阅读文档时,
FloatAnimation1.Start;
这将重新启动动画。将 Enabled
设置为 True
将调用 Start
,但仅当已启用
当前为错误
。因此,最简单的方法是直接调用 Start
方法。
This will restart the animation. Setting Enabled
to True
will call Start
, but only if Enabled
is currently False
. So it's easiest just to call the Start
method directly.
这篇关于重用TFloatAnimation Delphi XE5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!