3 つのパネルのそれぞれに 5 つのテキスト入力を表示するカスタムItemRendererがあります。
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox
xmlns:mx="http://www.adobe.com/2006/mxml"
height="300"
width="800"
creationComplete="onCreationComplete()"
>
<!-- code-behind -->
<mx:Script source="ChainListRenderer.mxml.as" />
<mx:Label text="{data.title}" fontSize="25" fontWeight="bold" width="100%" textAlign="center" />
<mx:HBox>
<mx:Panel id="triggerPanel" title="Trigger" width="260">
<mx:VBox id="tpBoxes" width="100%" paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5">
<mx:TextInput id="trigger1" width="100%" textAlign="left" tabIndex="0" tabEnabled="true" />
<mx:TextInput id="trigger2" width="100%" textAlign="left" tabIndex="1" tabEnabled="true" />
<mx:TextInput id="trigger3" width="100%" textAlign="left" tabIndex="2" tabEnabled="true" />
<mx:TextInput id="trigger4" width="100%" textAlign="left" tabIndex="3" tabEnabled="true" />
<mx:TextInput id="trigger5" width="100%" textAlign="left" tabIndex="4" tabEnabled="true" />
</mx:VBox>
</mx:Panel>
<mx:Panel id="linkPanel" title="Link" width="260">
<mx:VBox id="lpBoxes" width="100%" paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5">
<mx:TextInput id="link1" width="100%" textAlign="left" tabIndex="5" tabEnabled="true" />
<mx:TextInput id="link2" width="100%" textAlign="left" tabIndex="6" tabEnabled="true" />
<mx:TextInput id="link3" width="100%" textAlign="left" tabIndex="7" tabEnabled="true" />
<mx:TextInput id="link4" width="100%" textAlign="left" tabIndex="8" tabEnabled="true" />
<mx:TextInput id="link5" width="100%" textAlign="left" tabIndex="9" tabEnabled="true" />
</mx:VBox>
</mx:Panel>
<mx:Panel id="answerPanel" title="Answer" width="260">
<mx:VBox id="apBoxes" width="100%" paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5">
<mx:TextInput id="answer1" width="100%" textAlign="left" tabIndex="10" tabEnabled="true" />
<mx:TextInput id="answer2" width="100%" textAlign="left" tabIndex="11" tabEnabled="true" />
<mx:TextInput id="answer3" width="100%" textAlign="left" tabIndex="12" tabEnabled="true" />
<mx:TextInput id="answer4" width="100%" textAlign="left" tabIndex="13" tabEnabled="true" />
<mx:TextInput id="answer5" width="100%" textAlign="left" tabIndex="14" tabEnabled="true" />
</mx:VBox>
</mx:Panel>
</mx:HBox>
</mx:VBox>
残念ながら、ItemRenderer として使用すると、上記の tabIndex 値を使用しても、テキスト入力間のタブ移動は機能しません。このコードを独自の MXML アプリケーションにコピーすると、テキスト入力間のタブ移動が期待どおりに機能します。
このシナリオでタブを復元する方法を知っている人はいますか? このような単純なユーザビリティ要素なしでこのアプリをリリースしなければならないのは残念です.
を実装する必要があるかもしれmx.managers.IFocusManagerComponent
ませんが、それを行う方法の例が見つからず、FocusManager ドキュメントも役に立ちません。