# Controlling position of text fields based on varying height

**URL:** <https://forum.kirupa.com/t/controlling-position-of-text-fields-based-on-varying-height/323555>\
**Category:** Uncategorized\
**Created:** [July 6, 2011, 5:46pm UTC](https://forum.kirupa.com/t/controlling-position-of-text-fields-based-on-varying-height/323555 "2011-07-06T17:46:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![m2244](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@m2244](https://forum.kirupa.com/u/m2244)\
**Post date:** [July 6, 2011, 5:46pm UTC](https://forum.kirupa.com/t/controlling-position-of-text-fields-based-on-varying-height/323555/1 "2011-07-06T17:46:55Z")

</div>

Hello,

So, I am populating a textfield with text from XML files. I am wondering what the best way is to handle positioning the TF based on the number of lines of text. So if there is only one line, the textfield’s ‘y’ position might be 100, but if there are 2 lines I want it to move to say 80.
