# Positioning the textField Y coord based on TextField Height

**URL:** <https://forum.kirupa.com/t/positioning-the-textfield-y-coord-based-on-textfield-height/262844>\
**Category:** flash\
**Created:** [June 10, 2008, 2:50pm UTC](https://forum.kirupa.com/t/positioning-the-textfield-y-coord-based-on-textfield-height/262844 "2008-06-10T14:50:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgarimella](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@rgarimella](https://forum.kirupa.com/u/rgarimella)\
**Post date:** [June 10, 2008, 2:50pm UTC](https://forum.kirupa.com/t/positioning-the-textfield-y-coord-based-on-textfield-height/262844/1 "2008-06-10T14:50:03Z")

</div>

Hi All,

I wanted to position the TextField based on the height of the text in the text field. Not able to figure where I am doing wrong. The Y position does not leave 25 pixels after the last line of text. Textfield1 and Textfield2 kind of overlap.

I am able to get the TextField Height, by using the Timer Class. I am trying to position the y coordinates with 25 pixel spacing between the last line of the TextField and the next available Textfield.

\_totalDistractors = 4

for(var i:int = 0; i \< \_totalDistractors ; i++) {  
var taradioButtoni:TextArea = new TextArea();  
taradioButtoni.text = answerChoices\*; // Text Comes from array  
taradioButtoni.width = 380;  
taradioButtoni.height = taradioButtoni.textHeight + 10;

taradioButtoni.y = i\*(taradioButtoni.height + 25);// Need to refine this line of code

taradioButtoni.wordWrap= true ;  
}
