Animation - Stop メソッド

アニメーションを停止し、アニメーションの最後に進みます

Animation (PRIM_ANIM) のメンバ

詳細

Stop メソッドは、アニメーションを停止するために使用されます。

アニメーションは、アニメーションが完了するまで、コントロールの実際のプロパティ値に影響を与えません。終了前にアニメーションを停止するとすべてのコントロールがアニメーションが開始される前の状態に戻ります。

この例では、ラベルをクリックすると3秒で200ピクセル移動します。アニメーション中に[停止]ボタンをクリックすると、ラベルは開始点に戻ります。 

     Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(112) Clientwidth(1050) Height(151) Width(1066) Left(218) Top(203) Theme(#SYS_THEME<2015Orange>)

Define_Com Class(#PRIM_VS.Style) Name(#Style1) Backgroundbrush(#Brush1)
Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush1) Color(Theme500)

Define_Com Class(#PRIM_labl) Name(#Label) Displayposition(1) Left(8) Parent(#COM_OWNER) Tabposition(1) Top(8) Tabstop(False) Height(65) Width(105) Alignment(Center) Verticalalignment(Center) Style(#Style1) Caption('Click')
Define_Com Class(#PRIM_PHBN) Name(#Stop) Caption('Stop') Displayposition(2) Left(8) Parent(#COM_OWNER) Tabposition(2) Top(80)

Define_Com Class(#prim_anim) Name(#Animation)
Define_Com Class(#prim_anim.Move) Name(#Animation1) Parent(#Animation) Left(200) Manage(#Label) Duration(3000)

Evtroutine Handling(#Label.Click)
#Label := "Animating"
#Animation.Start
Endroutine

Evtroutine Handling(#Stop.Click)
#Animation.Stop
Endroutine

Evtroutine Handling(#Animation.Ended)
#Label := ("Click (Left &1)").Substitute( #Label.left.AsString )
Endroutine

End_Com


参照

すべてのコンポーネント クラス
テクニカルリファレンス

  • No labels