Transitions

LANSA Version 13 SP2

Transitions


Transitions are little more than a more interesting way of bringing a panel to the front, similar to the way slide transition in Microsoft PowerPoint.

Today, when we want to bring a panel to the front we write code that looks similar to the below.

#Panel2.Visible := True

#Panel1.Visible := False

 

This shows a secondary panel and hides the currently visible one. The processing is instant and the effect is simple.

However, with transitions we can make one panel fade while the other appears, or have one roll down from the top of the screen to cover one on top.

Define_Com Class(#prim_anim) Name(#Animation)

Define_Com Class(#prim_anim.Transition) Name(#Flip) Source(#Panel1) Target(#Panel2) Transitiontype(Flip) Parent(#Animation)

Evtroutine Handling(#Button.Click)

#Animation.Start

Endroutine

 

The code above defines a simple animation that uses the Flip transition. This will be available as a feature of all controls eventually resulting in much more concise code.

Evtroutine Handling(#Button.Click)

#Panel1.TransitionTo(#Panel2 Flip)

Endroutine