flex mobile:textInput 没有清除焦点提示 [英] flex mobile : textInput does not clear prompt on focus

查看:19
本文介绍了flex mobile:textInput 没有清除焦点提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个简单的

<s:TextInput x="163" y="117"  prompt="hello"/>

不清除焦点提示,但在用户第一次输入字母时清除提示.

Does not clear the prompt on focus, but clears the prompt when user first type in a letter.

这是 flex mobile 上的行为(在 swf 上行为正常)

This is the behaviour on flex mobile (behaviour is OK on swf )

这是一个错误以及如何更正吗?

Is that a bug and how to correct that ?

问候

推荐答案

可能有另一种方法可以摆脱这种情况,但我的方法是您可以添加一个 focusIn 事件并执行以下操作:

There May be an-other way to get rid of that, but my approach is that you may add a focusIn event and do some thing like :

<s:TextInput id="textInput" x="10" y="24" prompt="Enter SomeThing" focusIn="textinput1_focusInHandler(event)"/>
<fx:Script>
    <![CDATA[
        protected function textinput1_focusInHandler(event:FocusEvent):void
        {
            // TODO Auto-generated method stub
            textInput.prompt = "";
        }
    ]]>
</fx:Script>

可能对你有用...

这篇关于flex mobile:textInput 没有清除焦点提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆