Flex移动:与textInput确实对焦点不清晰提示 [英] flex mobile : textInput does not clear prompt on focus

查看:138
本文介绍了Flex移动:与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移动行为的(行为上的SWF OK)

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

那是一个错误,以及如何纠正?

Is that a bug and how to correct that ?

关于

推荐答案

其实解决隐藏提示的重点是pretty的方便,只需添加一个样式声明是这样

Actually the solution to hide prompt on focus is pretty easy, just add a style declaration like this

s|TextInput{
    showPromptWhenFocused: false;
}

或在一个类

.noPromptOnFocus{
    showPromptWhenFocused: false;
}

如果您使用第二种方法,你的TextInput应该是这个样子

If you use the second approach, your TextInput should look something like

<s:TextInput id="myTextInput" prompt="Write something here.." styleName="noPromptWhenFocused" />

这工作正常不管你使用StageText的或TextInputSkin。

This works fine no matter if you're using StageText or the TextInputSkin.

这篇关于Flex移动:与textInput确实对焦点不清晰提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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