Dynamically generate table from text boxes

Hiya, I’m looking at making a table from dynamically generated text boxes that will adapt their size so the information that is passed to them will fit. the table needs to be 5 columns wide and 10 rows deep.
I’ve tried doing it by generating each row seperately:
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#808080]//x Positions for columns[/COLOR]
[COLOR=#000000]var[/COLOR] x1:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]0[/COLOR];
[COLOR=#808080]//0[/COLOR]
[COLOR=#000000]var[/COLOR] x2:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]90[/COLOR];
[COLOR=#808080]//1[/COLOR]
[COLOR=#000000]var[/COLOR] x3:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]280[/COLOR];
[COLOR=#808080]//2[/COLOR]
[COLOR=#000000]var[/COLOR] x4:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]530[/COLOR];
[COLOR=#808080]//3[/COLOR]
[COLOR=#000000]var[/COLOR] x5:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]800[/COLOR];
[COLOR=#000000]function[/COLOR] createRowCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#0000ff]for[/COLOR] [COLOR=#000000]([/COLOR]i=[COLOR=#000080]0[/COLOR]; i<[COLOR=#000080]5[/COLOR]; i++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
rows = i+[COLOR=#000080]1[/COLOR];
[COLOR=#000000]var[/COLOR] xPos = [COLOR=#000000][[/COLOR][COLOR=#ff0000]“x”[/COLOR]+COLOR=#000000[/COLOR][COLOR=#000000]][/COLOR]
[COLOR=#000000]var[/COLOR] yPos = totalRowsHeightCOLOR=#000000[/COLOR]
[COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]createTextField[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“my_txt”[/COLOR]+COLOR=#000000[/COLOR][COLOR=#000000]][/COLOR], [COLOR=#000080]1[/COLOR], xPos, yPos, [COLOR=#000000][[/COLOR][COLOR=#ff0000]“x”[/COLOR]+COLOR=#000000[/COLOR][COLOR=#000000]][/COLOR]-[COLOR=#000000][[/COLOR][COLOR=#ff0000]“x”[/COLOR]+COLOR=#000000[/COLOR][COLOR=#000000]][/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#0000ff]this[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“my_txt”[/COLOR]+COLOR=#000000[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000ff]multiline[/COLOR] = [COLOR=#000000]true[/COLOR];
[COLOR=#0000ff]this[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“my_txt”[/COLOR]+COLOR=#000000[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000ff]wordWrap[/COLOR] = [COLOR=#000000]true[/COLOR];
[COLOR=#0000ff]this[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“my_txt”[/COLOR]+COLOR=#000000[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000ff]text[/COLOR] = [COLOR=#ff0000]"I am text box "[/COLOR]+COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]var[/COLOR] rows:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]3[/COLOR];
[COLOR=#000000]function[/COLOR] totalRowsHeightCOLOR=#000000[/COLOR]:[COLOR=#0000ff]Number[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#000000]var[/COLOR] totalHeight:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]0[/COLOR];
[COLOR=#0000ff]for[/COLOR] [COLOR=#000000]([/COLOR]i=[COLOR=#000080]0[/COLOR]; i<rows; i++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#808080]//trace(“i”);[/COLOR]
totalHeight += [COLOR=#0000ff]this[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“my_txt”[/COLOR]+COLOR=#000000[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000ff]height[/COLOR];
[COLOR=#808080]//trace(“mytxt1”+this[“my_txt”+1].height)[/COLOR]
[COLOR=#000000]}[/COLOR]
[COLOR=#808080]//trace(“TOTAL HEIGHT”);[/COLOR]
[COLOR=#0000ff]return[/COLOR] totalHeight;
[COLOR=#000000]}[/COLOR]
[/LEFT]
[/FONT]

and haven’t finished yet. i was wondering if anyone has come across the solution to my problem before.
Thanks for any help,
Schm

UPDATE-

I’ve just realised that I need to specify the height of the text box before it can be created, Is there any way that I can create a text box without specifying the height as this will vary depending on the content. The only way i can think is to use a fixed width font. Any ideas?

Cheers!
Schm