[FMX] wierd textfield behaviors

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;