Flex中如何通过设置restrict属性,在TextInput控件中限制用户可以输入的字符串
Flex中如何通过设置restrict属性,在TextInput控件中限制用户可以输入的字符串。本例中在restrict属性中设置了“a-z\0-9\-”,也就是只允许用户输入0到9的数字a到z的字母以及间隔符(-)。
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Script>
<![CDATA[
private function textInput_change(evt:Event):void {
arrColl.addItem(evt);
}
]]>
</mx:Script>
<mx:ArrayCollection id="arrColl" />
<mx:ApplicationControlBar dock="true">
<mx:TextInput id="textInput"
restrict="a-z\0-9\-"
change="textInput_change(event);" />
</mx:ApplicationControlBar>
<mx:DataGrid id="dataGrid"
dataProvider="{arrColl}"
width="100%"
height="100%" />
</mx:Application>
分享到:
相关推荐
可以设置控件里面显示的小数位数,通过restrict参数和小数位数动态控制,
npm install --save @mapbox/mapbox-gl-draw mapbox-gl-draw-rectangle-restrict-area 用法 import MapboxDraw from "@mapbox/mapbox-gl-draw" ; import DrawRectangle , { DrawStyles , } from "mapbox-gl-draw-...
初始化:从ng-pattern-restrict属性或pattern属性中保存要使用的正则表达式。 等待用户输入,然后到达input (对于任何值更改)、 keyup (对于键盘输入)或click (对于文本拖放、上下文复制粘贴等)。
用法参考我的Xavier读取RealSense数据的博客 `
ip6-dad-restrict:阻止网络设备使用IPv6隐私地址
display: -webkit-flex;display: flex; flex-direction: row; } .flex-col{ display: -webkit-flex; display: flex; flex-direction: column; } Javascript部分 .directive('flex',[function(){ return { restrict:...
一个很不错的Flex倒计时源码 技术要点TextInput组件的restrict属性应用如(0-9)意味着用户只能输入数字,还有那个倒计时的算法,同时可播放声音
A-PDF Restrict Remover.exe 可以破解pdf文件的密码的软件。
通过使用 A-PDF Restrict Remover,你可以立刻移除PDF文档的密码以及各种限制,它不是一个密码恢复工具,因为在您移除文档限制时不需要输入密码,A-PDF Restrict Remover 非常简单易用,在windows资源管理器中仅通过...
android-restrict-user-input:该演示项目包含有关如何通过使用Android中的EditText组件将用户输入限制为仅允许的字符的源代码
html-restrict:HTML :: Restrict-剥离不需要HTML标记
Node-restrict 能够阻止应用程序使用 procss.binding('process_wrap'), process.kill 和 child_process 的 Nodejs 模块。 代码示例: var restrict = require('restrict'); // ls is whitelisted restrict...
pg_restrict是一个扩展,用于限制上的某些SQL命令。 它介绍了类似于超级用户的主角色概念。 甚至超级用户也可以禁止删除数据库和角色(如果不是主角色)。 要求 PostgreSQL 9.3+ 编译安装 该扩展在PostgreSQL上受...
iOS 修改反注入标识__RESTRICT为其它值,同时具有注入功能
restrict-ip-koa-middleware 用途 这个中间件用来限制来访者的 IP 地址,起到类似防火墙的作用。 功能 白名单通过策略:只有白名单内的 IP 允许访问 黑名单拦截策略:只有黑名单内的 IP 不允许访问 内网地址通过:与...
--restrict-file-names=OS restrict chars in file names to ones OS allows. --ignore-case ignore case when matching files/directories. -4, --inet4-only connect only to IPv4 addresses. -6, --inet6-...
基本用法$ cat ~/.ssh/authorized_keyscommand="/usr/bin/git-restrict repo0 repo1 repo2" ssh-ed25519 AAA...1 user0@machinecommand="/usr/bin/git-restrict repo3 repo0" ssh-ed25519 AAA.Z user1@machine查看...
and drillthrough capabilities with cubes •Manage role-based security and restrict data access •Deploy and maintain a database in a production environment CD features •All practice exercises and ...
Provides information on ...based security and restrict data access•Deploy and maintain a database in a production environmentCD features•All practice exercises and answer files•Fully searchable eBook
and drillthrough capabilities with cubes •Manage role-based security and restrict data access •Deploy and maintain a database in a production environment CD features •All practice exercises and ...