Styleアニメーション (PRIM_ANIM.Style)
スタイルの変化をアニメーション化
祖先 - AnimationItemクラス (PRIM_ANIM.AnimationItem) オブジェクト (PRIM_OBJT)
Style アニメーションは、管理対象 control の Style を変更します。 アニメーションが完了すると、 コントロールの Style は、指定された Style と同じになります。
この例では、マウスがラベルの1つに入ると、スタイルは他の使用可能なスタイルと入れ替えられます。
Begin_Com Role(*EXTENDS #PRIM_WEB)
Define_Com Class(#PRIM_VS.Style) Name(#Style1) Backgroundbrush(#Brush1)
Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush1) Color(255:123:17)
Define_Com Class(#PRIM_VS.Style) Name(#Style2) Backgroundbrush(#Brush2)
Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush2) Color(85:131:255)
Define_Com Class(#PRIM_LABL) Name(#Label1) Displayposition(3) Ellipses(Word) Height(65) Left(64) Parent(#COM_OWNER) Tabposition(3) Tabstop(False) Top(72) Verticalalignment(Center) Width(105) Alignment(Center) Style(#Style1)
Define_Com Class(#PRIM_LABL) Name(#Label2) Displayposition(2) Ellipses(Word) Height(65) Left(288) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(72) Verticalalignment(Center) Width(105) Alignment(Center) Style(#Style1)
Define_Com Class(#PRIM_LABL) Name(#Label3) Displayposition(1) Ellipses(Word) Height(65) Left(176) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(72) Verticalalignment(Center) Width(105) Alignment(Center) Style(#Style1)
Define_Com Class(#prim_anim) Name(#Animation)
Define_Com Class(#prim_anim.Style) Name(#Animation1) Parent(#Animation) Duration(250) Style(#Style2)
Evtroutine Handling(#Label1.MouseEnter #Label2.MouseEnter #Label3.MouseEnter) Com_Sender(#Sender)
If (#Sender.Style *IsEqualTo #Style1)
#Animation1.Style <= #Style2
Else
#Animation1.Style <= #Style1
Endif
#Animation1.Control <= #Sender
#Animation.Start
Endroutine
End_Com
| 名前 | 記述 |
|---|---|
| ComponentClassName | コンポーネントのクラス名です。 オブジェクト (PRIM_OBJT) より継承 |
| ComponentMembers | このコンポーネントの全てにアクセスできるようにします。 オブジェクト (PRIM_OBJT) より継承 |
| ComponentPatternName | コンポーネントのクラスを制限します。 オブジェクト (PRIM_OBJT) より継承 |
| ComponentTag | インスタンス用に値を格納できる汎用スペース オブジェクト (PRIM_OBJT) より継承 |
| ComponentType | ComponentTypeではコンポーネントのタイプ情報にアクセスできます。 オブジェクト (PRIM_OBJT) より継承 |
| ComponentTypeName | ComponentTypeName十分適格なコンポーネントのクラス名です。 オブジェクト (PRIM_OBJT) より継承 |
| Control | スタイルが変更されるコントロールへの参照 |
| Duration | アニメーションを完了までのにかかる時間(ミリ秒) AnimationItemクラス (PRIM_ANIM.AnimationItem) より継承 |
| Name | コンポーネントの名前 オブジェクト (PRIM_OBJT) より継承 |
| Owner | コンポーネントのオーナーです。 オブジェクト (PRIM_OBJT) より継承 |
| Parent | このアイテムがあるアニメーションへの参照 AnimationItemクラス (PRIM_ANIM.AnimationItem) より継承 |
| StartTime | アニメーションが開始するまでの待ち時間(ミリ秒) AnimationItemクラス (PRIM_ANIM.AnimationItem) より継承 |
| Style | 適用されるスタイルへの参照 |
| 名前 | 記述 |
|---|---|
| CreateInstance | コンポーネントを作成する時にCreateInstanceのイベントを実行します。 Styleアニメーション (PRIM_ANIM.Style) より継承 |
| DestroyInstance | コンポーネントが解除される前にDestroyInstanceのイベントを実行します。 Styleアニメーション (PRIM_ANIM.Style) より継承 |
EPC150060 - December 2023