开发者

text input component

Is it possible to ignore white space between characters inside a text input field let's say a user types in "bri an" instead of "brian. Is there开发者_JAVA技巧 a way that white space is ignore and treated it as one word?


One of many ways is to use the TextField.restrict property. Simply prevent spaces from being typed into your textfield in the first place by doing this:

myTextField.restrict = "^ ";

The ^ means to disallow the following characters (in this case we are disallowing a space).

I put an example on wonderfl http://wonderfl.net/c/teOC

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜