Skip to main content
Participant
March 30, 2009
Question

TextLayout component & KeyboardEvent

  • March 30, 2009
  • 1 reply
  • 607 views
im trying to use a TextLayout component as a single line text input
i sat the component property to ReadWrite
but i didn't find a single line property ?
also i want to add a Keyboard event

TextLayout.addEventListener(KeyboardEvent.KEY_DOWN,xEnter)
function xEnter(k:KeyboardEvent){

if (k.keyCode == 13) {


trace(TextLayout.textFlow.flowComposer.getLineAt(0).textLine.textBlock.content.text)

}

}

is that the right way? it doesn't work for me?
This topic has been closed for replies.

1 reply

Adobe Employee
April 1, 2009
There is no multiLine flag in TLF as there is in TextField. This kind of support is provided through the Flex Gumbo widgets which are built on top of TLF. I would suggest taking a look at them, as part of the Flex Gumbo Open Source distribution. See http://opensource.adobe.com/wiki/display/flexsdk/Gumbo for more info on Gumbo.