4 Replies Latest reply on Mar 5, 2007 12:34 PM by ebrentnelson

    Image inside tab?

      Does anyone know of a way to insert an image into a tab instead of plain text? I want some visual effects on my text that I can't do in Flex, and the easiest way would just be to insert an image into the tab.
        • 1. Re: Image inside tab?
          peterent Level 2
          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>
          • 2. Re: Image inside tab?
            digitalentropy Level 1
            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?
            • 3. Re: Image inside tab?
              peterent Level 2
              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.
              • 4. Re: Image inside tab?
                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...