Hello,
the animation of a Button
works fine when the above code is executed inside the Click event of the button, and the button is pressed.
However, if I try to animate the button programmatically - without clicking on it - it does not work as expected.
In fact the button moves itself but it does not reach the coordinates set in the SetLayoutAnimated command, rather it reaches its default Left and Top properties which was set on the designer, and
the Width and Heigth properties are not affected either.
Is this the normal behaviour of SetLayoutAnimated ? Is there a way to move the button programmatically to an arbitrary position without having to click on it ?
[EDIT]
The above code works also fine when executed inside a Click event of another Button. But it does not work, for example, inside a timer_tick event wich is fired after loading the layout containing the Button to animate.
[/EDIT]
Regards,
Sergio
the animation of a Button
B4X:
btn_anim_test.SetLayoutAnimated( 2000,1,10,190,150,25)
However, if I try to animate the button programmatically - without clicking on it - it does not work as expected.
In fact the button moves itself but it does not reach the coordinates set in the SetLayoutAnimated command, rather it reaches its default Left and Top properties which was set on the designer, and
the Width and Heigth properties are not affected either.
Is this the normal behaviour of SetLayoutAnimated ? Is there a way to move the button programmatically to an arbitrary position without having to click on it ?
[EDIT]
The above code works also fine when executed inside a Click event of another Button. But it does not work, for example, inside a timer_tick event wich is fired after loading the layout containing the Button to animate.
[/EDIT]
Regards,
Sergio
Last edited: