I have a custom ItemRenderer that displays 5 text inputs in each of 3 panels:
<?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>
Unfortunately, when used as an ItemRenderer, tabbing between the text inputs doesn't work, even with the tabIndex values above. If I copy this code to an MXML application of its own, tabbing between text inputs works as expected.
Does anyone know how to restore tabbing in this scenario? It will be a shame if I have to release this app without such a simple usability element.
I suppose I may need to implement mx.managers.IFocusManagerComponent
, but I can't find any examples on how to do that, and the FocusManager docs aren't helping either.