Flex限制TextInput只接受十进制数字? [英] Flex restrict TextInput to accept only decimal numbers?
问题描述
- 是否有一些简单的方法可以限制TextInput接受范围-99.999999到+99.999999的十进制数字?
它是Spark TextInput。
您没有指定Spark TextInput或MX TextInput。您可以使用限制财产来防止人们输入数值(和期限)。它在Spark和MX组件上都可用。以下是 Spark Docs a>。 然后,使用 NumberValidator 来验证范围,设置最小值和最大值。 it is Spark TextInput. You didn't specify a Spark TextInput or an MX TextInput. You can use the restrict property to prevent people from entering numeric values (and the period). It is available on both the Spark and MX components. Here are the Spark Docs. After that, use a NumberValidator to validate the range, setting the min value and maxvalue. 这篇关于Flex限制TextInput只接受十进制数字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!