# Dumb TexExtent problem, but I can't get it to work!

**URL:** <https://forum.kirupa.com/t/dumb-texextent-problem-but-i-cant-get-it-to-work/217422>\
**Category:** Uncategorized\
**Created:** [February 26, 2007, 9:19pm UTC](https://forum.kirupa.com/t/dumb-texextent-problem-but-i-cant-get-it-to-work/217422 "2007-02-26T21:19:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![graylensman](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@graylensman](https://forum.kirupa.com/u/graylensman)\
**Post date:** [February 26, 2007, 9:19pm UTC](https://forum.kirupa.com/t/dumb-texextent-problem-but-i-cant-get-it-to-work/217422/1 "2007-02-26T21:19:03Z")

</div>

I’m sure there’s a simple solution here, but ■■■■■■ if I can find it. I cannot get the textFieldHeight to work!

```auto
//create text format object
msgFormat = new TextFormat();
msgFormat.size = 8;
msgFormat.align = "left";
msgFormat.color = "0xFFFFFF";
msgFormat.font = "Uni554";
//variable set with string to measure, in order to set dynamically created textField to size
babQuote = "There is a greater darkness than the one we fight. it is the darkness of the soul that has lost its way. The war we fight is not against powers and principalities; it is against chaos and dispair.";
//text extent object to return lengths of the string
babLength = msgFormat.getTextExtent(babQuote);
//can't get textFieldHeight to work!!
this.createTextField("box", 2, 10, 10, Stage.width-20, babLength.textFieldHeight);
with (box) {
    border = true;
    embedFonts = true;
    multiline=true;
    wordWrap = true;
    text = babQuote;
}
box.setTextFormat(msgFormat);

```

Please, somebody point out the obvious mistake.
