0

i have a simple TLFTextfield that i want to use as input field. It works mostly but if you type white spaces (pressing SPACE) on end of the line it will not break line (go to new line) but insted it stops at the end of the line. I tested it tracing field.getCharBoundaries() and it reported that x of the activePosition is getting bigger so conclusion was that white spaces are added but text is not wrapped and cursor is staying at the line end. If I try to backspace last char I realize that white spaces are really there but not visible.

import fl.text.TLFTextField;
import flashx.textLayout.formats.VerticalAlign;
import flashx.textLayout.edit.EditManager;

var field:TLFTextField = new TLFTextField();
field.selectable = true;
field.multiline = true;
field.wordWrap = true;
field.verticalAlign =  VerticalAlign.TOP;
field.width = 400;
field.height = 300;
field.x = 50;
field.y = 50;
field.borderColor = 0x000000;
field.border = true;
field.textFlow.interactionManager = new EditManager();
addChild(field);

Supplied code is so simple that anybody can try it and hopefully somebody can help. Just type white spaces to reproduce this issue. Thanks.

Rjanma
  • 1
  • 1
  • what happens when you type a letter after the white space? Also I'm sure I've seen some methods to set the wrapping behaviour, maybe this is the problem? – Lukasz 'Severiaan' Grela Nov 22 '13 at 07:57
  • @Lukasz - If you type a letter after space line is breaked and you can continue to type, but same behavior repeats at the end of each line. It looks like a bug where textline is not create on empty char...If you know some other method to wrap on white space please post :) – Rjanma Nov 22 '13 at 10:29
  • I was playing only with FTE not TLF but as it comes from FTE:) then try with [ElementFormat.html#breakOpportunity](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/engine/ElementFormat.html#breakOpportunity) – Lukasz 'Severiaan' Grela Nov 22 '13 at 12:31
  • @Lukasz - I have no idea how to apply ElementFormat to TLFTextField – Rjanma Nov 28 '13 at 11:59

0 Answers0