6 Replies Latest reply on Jun 14, 2006 11:07 AM by blemmo

    dynamically created textfields problem

    blemmo Level 1
      Hi people,

      I have a strange problem here: I want to create textfields dynamically that are just big enough to hold the text to display. The textfields use a font from the library. I get the metrics of the text with TextFormat.getTextExtent(), it seems to work ok. However, the last letters of the text are missing in the textfield after assigning the text, when the text needs more than 1 line. The textfield is sized for 2 lines, but the 2nd line is just empty. I applied wordWrap, but the text doesn't show at the 2nd line. This seems to be connected to the font that is used: I tested about a dozen different types, and only 1 of them displays always the full text, with all other fonts, the last 6 or so letters are missing. The text property of the textfields holds the complete text; where are the last letters?

      So, are there any known issues with textfields created dynamically? Or any trick to display all of the text? I'd like to use a monospaced font, but all I have tested have this strange problem.

      Attached is the code used for creatiing the textfields.