Change alignment dyn.textfield from a button

Hi there,

Anyone know how I can make a dynamic tekstfield change it’s alignment from left to right when hitting a button?Possible?How?

Big thx in advance;)

Grtz,