0

这是创建 StageText 的代码

var myTextField:StageText = new StageText();
myTextField.returnKeyLabel = ReturnKeyLabel.SEARCH;
myTextField.text = tlf.text;
myTextField.editable = true;
myTextField.fontFamily = "Ariel"
myTextField.fontSize = 40;
myTextField.color =  tlf.textColor
myTextField.textAlign = TextFormatAlign.RIGHT
myTextField.stage = stage;
myTextField.viewPort = new Rectangle(p.x,  p.y, tlf.width*screenUtil.xScaleFactor,tlf.height*screenUtil.yScaleFactor);
txtInputVo.stageText = myTextField;
myTextField.locale = "he-IL";
myTextField.addEventListener(FocusEvent.FOCUS_IN, onInFocus);
myTextField.addEventListener(FocusEvent.FOCUS_OUT, onOutFocus);
protected function onInFocus(event:FocusEvent):void
{
    var sTxt:StageText = event.currentTarget as StageText;
    var textInputVo:TextInputVO =  getTextInputVO(sTxt);
    if(textInputVo.defultText == sTxt.text)
    {
        sTxt.text = "";
    }
}

它工作得很好,键盘出现了,你可以插入和编辑文本,但光标没有出现?

到目前为止,我只在 Android Air 3.6 上测试过它。

4

1 回答 1

1

尝试“Arial”而不是“Ariel”作为字体系列

于 2014-10-26T21:53:58.903 回答