Actionscript 3 选项卡在mx:TileList组件中不起作用
我使用mx:Tilelist组件在屏幕上显示一组文本字段,但当我试图通过TAB-foucs遍历字段时,会将其移出列表。请提供此问题的解决方案。下面是我正在使用的代码Actionscript 3 选项卡在mx:TileList组件中不起作用,actionscript-3,apache-flex,flex4,adobe,Actionscript 3,Apache Flex,Flex4,Adobe,我使用mx:Tilelist组件在屏幕上显示一组文本字段,但当我试图通过TAB-foucs遍历字段时,会将其移出列表。请提供此问题的解决方案。下面是我正在使用的代码 <mx:TileList id="tileList" dataProvider="{collection}" change="setCurrentIndex(tileList.selectedIndex);" dataChange="setCurr
<mx:TileList id="tileList"
dataProvider="{collection}"
change="setCurrentIndex(tileList.selectedIndex);"
dataChange="setCurrentIndex(tileList.selectedIndex);"
columnCount="1"
columnWidth="345"
itemRenderer="components.InputParamIR"
rowHeight="30"
verticalScrollPolicy="auto"
horizontalScrollPolicy="auto"
backgroundColor="#EEEEEE"
dragEnabled="false"
dragMoveEnabled="true"
dropEnabled="true"
width="100%" height="100%"
itemClick="chartTileClick(event);"
/>
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.containers.Panel;
[Bindable]
public var index:uint;
[Bindable]
public var collection:ArrayCollection = new ArrayCollection();
[Bindable]
public var isVisible:Boolean ;
public function initEventsLocal(event:Event):void
{
this.initEvents(event);
collection = new ArrayCollection();
isVisible = false;
}
private function chartTileClick(event:ListEvent):void
{
event.currentTarget.tabFocusEnabled=true;
event.currentTarget.tabEnabled=true;
}
]]>
</fx:Script>
在Flex List Itemrenderer中可能无法获得焦点,因为它是不可编辑的,并且不会实现焦点管理器界面,您需要在项目渲染器组件中实现IfocusManager组件。InputParamIR还必须覆盖TileList类以启用子级选项卡
package
{
import mx.controls.TileList;
public class MyTileList extends TileList
{
override protected function createChildren():void {
super.createChildren();
this.listContent.tabChildren = this.tabChildren
this.listContent.tabEnabled = this.tabEnabled
}
}
}
看看这些
我希望这对你有帮助
快乐编码