Hi Brandon,

Use the following to set focus for the textField's instance of UITextField:

var textField:UITextField = new UITextField();
textField.type = "input";
textField.autoSize = TextFieldAutoSize.LEFT;
textField.multiline = true;
textField.wordWrap = false;
textField.border = false;

myContainer.addChild(textField)

textField.setFocus(textField);

Notice, that first you have to add textField to the DisplayChildList
of corresponding container via addChild and only then you can call
"setFocus" on it.

2008/9/19 Brandon Krakowsky <[EMAIL PROTECTED]>:
> I'm creating some Input UITextField instances dynamically, and then trying
> to place the cursor inside.  Can't seem to get it working.
>
> var textField:UITextField = new UITextField();
> textField.type = "input";
> textField.autoSize = TextFieldAutoSize.LEFT;
> textField.multiline = true;
> textField.wordWrap = false;
> textField.border = false;
>
> stage.focus = textField;
>
> It seems to get the focus, but doesn't put the cursor inside.  Can't just
> start typing.  Also, textField.setFocus() doesn't work.

--
Med venlig hilsen / Best regards
Andriy Panas
[EMAIL PROTECTED]

Reply via email to