How to change View animation on runtime?


Tinn Aphopchung
How to change View animation on runtime?(by coding) I try setvar as in progress2 sample.It undefined in view property. not working. noname

DecSoft

Hello Tin,

Both views's "Animation" and "Classes" are only available at designtime. Finally what AB do is to place these both options' values inside the class attribute of the views' root HTML element. So, for example, we can get our view's HTML like the below one:

Knowing that, we can use a bit of Javascript in order to modify the class attribute of a view, for example, using certain view's class or their name, which is also an identifier ready to be used:



Tinn Aphopchung
thank you!! Edit:code I try it but animation effect was not change to that,David.

Tinn Aphopchung
Another question,how to set animation on control to play after click on button?

DecSoft

Hello Tin,

About your first issue, maybe the question is where you place that code. I test it in the Show event of an app's view and works as expected.

About your second question, place a "Button1" control in an app's view; set the "Classes" variable of that control to "animated flash"; finally place the below code in the control's Click event:

I am not sure if the above can be enough, but, are close to that the animation CSS classes can offer to us.



Tinn Aphopchung
I test it in show event,it work.Look like I need to use if statement with PreView to decide which situation to fire event. Thank again David.

DecSoft

You're welcome Tin! :-)


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.