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! :-)


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.