PDA

View Full Version : dynamic textfields and listing them



geestring
March 13th, 2010, 06:14 PM
so i want to have my dynamic text listed with a consistent space between each textfield.

However, the textfields can have varying amounts of text, so just doing txt.y = t*40 would not cut it.

I've tried getting txt.length to calculate how many lines it would be, but if i change the font size it changes everything.

How can i do this easily?

snickelfritz
March 13th, 2010, 07:40 PM
var padding:int = 5;
myTextfield.width = mytextfield.textWidth + padding;

mykhel0003
March 14th, 2010, 07:27 AM
txt.y = previousTxtHeight + previousTxtY + 40;