0

My company has a Apache Flex 4.11 application. In this application we use Text Flow to allow our users to create text boxes on a page and edit the text. The problem we are having is that when a user types in a word that is longer then the textbox is wide the word will be broken and the remainder of the word will be put on a new line. What we need is for the word to rather be truncated or allowed to go past the X bound of the text box. Is this possible?

var myFormat:TextFormat = new TextFormat();
myFormat.size = 15;

var myText:TextField = new TextField();
myText.defaultTextFormat = myFormat;
myText.text = "HEADLINE";
myText.border = true;
myText.wordWrap = true;
myText.width = 25;
myText.height = 200;
myText.x = 10;
myText.y = 10;

addChild(myText);

If you need more information I will be happy to provide it.

ketan
  • 19,129
  • 42
  • 60
  • 98
  • Why the downvote? Is more information needed? This is my first post so if I did something wrong please let me know. – Jeffrey Rempel Mar 10 '15 at 20:54
  • 1
    It would definitely help to show a code sample for the text boxes you're using. There are multiple components that serve as text boxes in Flex, and potential answers depend on which one you're using. – Brian Mar 10 '15 at 22:40
  • I have updated my question to contain sample code. Any help would be much appreciated. I would post images of what I get vs. what I want but I don't have enough reputation points for that yet. – Jeffrey Rempel Mar 11 '15 at 15:07
  • Could you use `TextInput` instead of `TextField`? Also, look at the `maxChars` property on `TextField`. – Brian Mar 11 '15 at 16:13

0 Answers0