26.7.创建标签以设置访问顺序
26.7.1. 问题
我想支持那些使用指针设备有困难的用户(指针设备就是鼠标之类)
26.7.2. 解决办法
为组件定义一个标签顺序以便用户可以不使用指针设备而能导航应用程序
26.7.3. 讨论
标签顺序是应用程序非常重要的易用性指标。它能使用户无需频繁切换键盘和指针设备就能轻松导航整个应用程序。对于使用指针设备难得用户,标签顺序是很必要的。你可以设置每个对象的tabIndex属性以指定组件的标签顺序。下面的例子TabOrder.mxml,设置了标签顺序,这样用户就能不用鼠标也能轻松导航:
我想支持那些使用指针设备有困难的用户(指针设备就是鼠标之类)
26.7.2. 解决办法
为组件定义一个标签顺序以便用户可以不使用指针设备而能导航应用程序
26.7.3. 讨论
标签顺序是应用程序非常重要的易用性指标。它能使用户无需频繁切换键盘和指针设备就能轻松导航整个应用程序。对于使用指针设备难得用户,标签顺序是很必要的。你可以设置每个对象的tabIndex属性以指定组件的标签顺序。下面的例子TabOrder.mxml,设置了标签顺序,这样用户就能不用鼠标也能轻松导航:
+展开
-XML
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="firstName.setFocus()">
<mx:Canvas width="228" height="215" x="50" y="50"
backgroundColor="#FFFFFF">
<mx:Label x="10" y="10" text="First Name" tabIndex="1" />
<mx:TextInput x="10" y="36" width="100" id="firstName"
tabIndex="2"/>
<mx:Label x="118" y="10" text="Last Name" tabIndex="3" />
<mx:TextInput x="118" y="36" width="100" id="lastName"
tabIndex="4"/>
<mx:Label x="10" y="69" text="Address" tabIndex="5" />
<mx:TextInput x="10" y="95" width="208" id="address"
tabIndex="6"/>
<mx:Label x="10" y="125" text="City" tabIndex="7"/>
<mx:TextInput x="10" y="151" width="100" id="city"
tabIndex="8"/>
<mx:Label x="118" y="125" text="State" tabIndex="9"/>
<mx:TextInput x="118" y="151" width="34" id="state"
tabIndex="10"/>
<mx:Label x="160" y="125" text="Zip" tabIndex="11"/>
<mx:TextInput x="160" y="151" width="58" id="zip"
tabIndex="12"/>
<mx:Button x="153" y="181" label="Submit" id="submit"
tabIndex="13"/>
</mx:Canvas>
</mx:Application>
layout="absolute" creationComplete="firstName.setFocus()">
<mx:Canvas width="228" height="215" x="50" y="50"
backgroundColor="#FFFFFF">
<mx:Label x="10" y="10" text="First Name" tabIndex="1" />
<mx:TextInput x="10" y="36" width="100" id="firstName"
tabIndex="2"/>
<mx:Label x="118" y="10" text="Last Name" tabIndex="3" />
<mx:TextInput x="118" y="36" width="100" id="lastName"
tabIndex="4"/>
<mx:Label x="10" y="69" text="Address" tabIndex="5" />
<mx:TextInput x="10" y="95" width="208" id="address"
tabIndex="6"/>
<mx:Label x="10" y="125" text="City" tabIndex="7"/>
<mx:TextInput x="10" y="151" width="100" id="city"
tabIndex="8"/>
<mx:Label x="118" y="125" text="State" tabIndex="9"/>
<mx:TextInput x="118" y="151" width="34" id="state"
tabIndex="10"/>
<mx:Label x="160" y="125" text="Zip" tabIndex="11"/>
<mx:TextInput x="160" y="151" width="58" id="zip"
tabIndex="12"/>
<mx:Button x="153" y="181" label="Submit" id="submit"
tabIndex="13"/>
</mx:Canvas>
</mx:Application>
加支付宝好友偷能量挖...