版主:还想请教回车仿Tab,Z字型转移焦点的问题。
我写了一段,俘获回车事件,然后
方法1:将event中的回车,偷梁换柱成Tab
方法2:灭掉当前的回车事件(要不焦点往下一行去),然后放出一个失去焦点事件(仿的DataGrid中itemEditorFocusOutHandler)
但是,第一种方法无效,第二种方法,总是出错。
请教版主该如何处理??
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
xmlns:flexlib="http://code.google.com/p/flexlib/"
xmlns:ns1="com.fujitsu.cn.bfs.yangtze.components.*"
xmlns:ctrl="com.fujitsu.cn.bfs.fuhua.wms.control.lm.*"
>
<mx:XML id="treeNavigatorXml" source="assets/xml/navigator.xml" />
<mx:XML id="menuXml" source="assets/xml/menu.xml" />
<mx:XML id="toolbarXml" source="assets/xml/toolbar.xml" />
<ctrl:WLM0030FCtrl id="ctrl"/>
<mx:Panel id="mainPanel" textAlign="left" title="Fuhua V4" width="100%" height="100%" backgroundColor="#F0F0F0">
<mx:VBox horizontalAlign="left" verticalAlign="top" horizontalGap="0" width="100%" borderStyle="none" height="100%">
<mx:ApplicationControlBar width="100%" paddingTop="0" paddingLeft="0" paddingBottom="0" paddingRight="0">
<mx:VBox width="100%">
<mx:MenuBar id="menu" showRoot="false" width="100%" height="22"/>
<mx:LinkBar id="quickButtons" width="100%" height="40" horizontalAlign="left"/>
</mx:VBox>
</mx:ApplicationControlBar>
<mx:HDividedBox id="hdivbox" width="100%" height="100%" borderStyle="none" liveDragging="false">
<mx:VBox id="navBox" height="100%" width="200" borderStyle="solid" horizontalAlign="right" verticalGap="0" backgroundColor="#ffffff">
<mx:LinkButton label="" toolTip="Fix" cornerRadius="0" width="16" height="16" id="nailButton" toggle="true"/>
<mx:Tree id="treeNavigator" showRoot="false" height="100%" width="100%" borderStyle="none"/>
</mx:VBox>
<flexlib:MDICanvas id="mdiCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off"
width="100%" height="100%" backgroundColor="#FFFFFF" backgroundAlpha="0">
</flexlib:MDICanvas>
</mx:HDividedBox>
<mx:ControlBar width="100%" height="32" verticalAlign="middle" horizontalAlign="right">
<mx:Label id="process" visible="false"/>
<mx:ProgressBar id="pgrsProcess" trackHeight="16" width="60" height="16" label=" " textAlign="right" indeterminate="true" enabled="true" themeColor="#0600FF" visible="{process.text!='0'}"/>
</mx:ControlBar>
</mx:VBox>
</mx:Panel>
</mx:Canvas>