# Problem with TextBox, any help?

**URL:** <https://forum.kirupa.com/t/problem-with-textbox-any-help/155625>\
**Category:** flash\
**Created:** [July 19, 2005, 7:28am UTC](https://forum.kirupa.com/t/problem-with-textbox-any-help/155625 "2005-07-19T07:28:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Silmano](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/silmano/32/1479_2.png) [@Silmano](https://forum.kirupa.com/u/Silmano)\
**Post date:** [July 19, 2005, 7:28am UTC](https://forum.kirupa.com/t/problem-with-textbox-any-help/155625/1 "2005-07-19T07:28:28Z")

</div>

I have the following problem:

I create a box with the lineTo command and I want to create there a text box (depending on box width). I’m trying using the following code, but it doesnt seem to work well… I generate the box, but I’m unable to see the text…

```auto
//formatText - a TextFormat object
createEmptyMovieClip("buttonTest",0);
buttonTest.lineStyle(1,0xFFFFFF,100);
buttonTest.moveTo(x,y);
buttonTest.beginFill(0x006600,100);
buttonTest.lineTo(x+itemLength,y);
buttonTest.lineTo(x+itemLength,y+20);
buttonTest.lineTo(x,y+20);
buttonTest.lineTo(x,y);
buttonTest.endFill();
buttonTest.createTextField("textBox", i+1, x, y, x+itemLength, y+20)
textBox.setNewTextFormat(formatText);
//Reads current node (XML file) and prints to text field
textBox.text = currentNode.attributes.name;

```
