# \[FMX\] wierd textfield behaviors

**URL:** <https://forum.kirupa.com/t/fmx-wierd-textfield-behaviors/86757>\
**Category:** flash\
**Created:** [April 15, 2005, 9:18am UTC](https://forum.kirupa.com/t/fmx-wierd-textfield-behaviors/86757 "2005-04-15T09:18:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakepeg](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@jakepeg](https://forum.kirupa.com/u/jakepeg)\
**Post date:** [April 15, 2005, 9:18am UTC](https://forum.kirupa.com/t/fmx-wierd-textfield-behaviors/86757/1 "2005-04-15T09:18:04Z")

</div>

you may have read my post below? but I’m creating dynamic buttons, I’m using textFields to make them.

I have a problem with the text on them.

I want the text to wrap, autosize and be multiline - ie I want the button to be a certain width and if the text is longer for a particular button the button will be higher with the text going onto the next line.

The wierd thing is that it worked, I went and made a cup of tea, came back and it was not working! Maybe the cat changed my code but I cannot see where.

Here is the code I’m using…

c.\_y = 40 \* i;  
c.createTextField(“chap” + i, i, 10, 100, 150, 35);  
var tf = c[“chap” + i];  
tf.autoSize = true;  
tf.text = bk.pmntasection\*.pmntasectionName;  
tf.backgroundColor = 0xCCCCCC;  
tf.background = true;  
tf.wordWrap = true;  
tf.multiline = true;  
tf.border = true;
