# Arrays and programatic dynamic textfields

**URL:** <https://forum.kirupa.com/t/arrays-and-programatic-dynamic-textfields/124023>\
**Category:** Uncategorized\
**Created:** [September 29, 2004, 12:59pm UTC](https://forum.kirupa.com/t/arrays-and-programatic-dynamic-textfields/124023 "2004-09-29T12:59:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![khawar](https://avatars.discourse-cdn.com/v4/letter/k/eb9ed0/32.png) [@khawar](https://forum.kirupa.com/u/khawar)\
**Post date:** [September 29, 2004, 12:59pm UTC](https://forum.kirupa.com/t/arrays-and-programatic-dynamic-textfields/124023/1 "2004-09-29T12:59:44Z")

</div>

hi

i have a bit problem of saving the programaticallly created textfields in the arrays. MY code goes on like this

for(i=0;i\<15;i++)  
{  
s\*=\_root.createTextField(“work”+i+"\_txt",100_i,0,40_i,100,50);  
}  
s[1].text=“my name is khawar shehzad”;

but this works when i create a textfield and then assign it to the arrays like this.

\_root.createTextField(“myTxt”,2,0,0,100,50);  
arr=[];  
arr[0]=myTxt;  
arr.text=“my name is khawar shehzad”;

i want to create the textFields using for loop and then assign them to the arrays using for loop.

cheers

khawar
