PDA

View Full Version : edit text: dynamically change value


julian_lp
04-13-2006, 12:09 AM
from LZX docs:

<canvas bgcolor="blue" height="60" >
<edittext id="edt_1">default text goes here</edittext>
</canvas>


fine, but how should I do in oder to change dynamically the text inside "edt_1" edittext?

I tried

<button>
<method event="onclick">
edt_1.setValue('whatever_with_&&&&&&');
</method>
</button>


without any luck...

BTW: Note that I also need to include an ampersand character in the text

regards - jm

Shelby
04-13-2006, 05:27 AM
try setText(). You can use Ampersands in there as well. To play with it, use this code and type field.setText('Something & Something') in the Debug window.


<canvas debug="true">

<edittext name="field" text="Hello World"/>

</canvas>