开发者

text input component

开发者 https://www.devze.com 2023-01-29 03:33 出处:网络
Is it possible to ignore white space between characters inside a text input field let\'s saya user types in\"bri an\"instead of \"brian.

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

精彩评论

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

关注公众号