This content has been marked as final. Show 4 replies
Do you mean you want the image in the actual "tab" that normally has a label or inside the area associated with the tab?
If you mean in the tab itself, add an icon to the container:
<mx:TabNavigator ... >
<mx:VBox label="Tab 1" icon="@Embed('firstabimage.jpg)'" > ... </mx:VBox>
Yes, Peter, putting it inside the actual tab is what I wanted. Embedding it as an icon worked great - but now, can you tell me how to have one image for when a tab is selected, and one for the deselected tabs?
You can either write a skin for the tabs or you can try a bit of ActionScript (which I have not verified, so it may not work). When the container child of the TabNavigator is made visible, it receives a show event; when hidden it receives a hide event. You can use these events to switch the icons on the container. At least that's the theory.
Is there a way to center the icon? I want my tabs to fill the complete TabNavigator width and it looks not good with the icons on the left...