[ 
https://issues.apache.org/jira/browse/FLEX-11491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Kessler resolved FLEX-11491.
---------------------------------

    Resolution: Cannot Reproduce

Using below test application.  Was unable to reproduce issue.  Must have been 
resolved in a previous SDK version.

<?xml version="1.0" encoding="utf-8"?>
<!---
   Test application
-->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"> 

    <fx:Script>
        <![CDATA[
            import mx.managers.PopUpManager;
            import mx.core.IFlexDisplayObject;
                    
            public function openTabNavIcon():void
            {
                var window:IFlexDisplayObject = new MyTab();

                PopUpManager.addPopUp(window, this);
                PopUpManager.centerPopUp(window);
            }

        ]]>
    </fx:Script>

    <s:layout>
        <s:VerticalLayout horizontalAlign="center" verticalAlign="middle" 
gap="0" />
    </s:layout>

    <fx:Declarations>

        <fx:Component className="MyTab">
            <mx:TitleWindow>
                <mx:TabNavigator>
                    <mx:Canvas icon="@Embed(source='test.jpg')"/>
                    <mx:Canvas icon="@Embed(source='test.jpg')"/>
                </mx:TabNavigator>
            </mx:TitleWindow>
        </fx:Component>

    </fx:Declarations>

    
    <mx:Button label="Open Tab To See the bug with icons" 
click="openTabNavIcon()"/>

</s:Application>

                
> Icons In TabNavigator not placed properly when TabNavigator inside a 
> TitleWindow
> --------------------------------------------------------------------------------
>
>                 Key: FLEX-11491
>                 URL: https://issues.apache.org/jira/browse/FLEX-11491
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: mx: Tab Navigator
>    Affects Versions: Adobe Flex SDK 2.0.1 (Release)
>         Environment: Affected OS(s): Windows
> Affected OS(s): Windows
> Browser: Internet Explorer 6.x
> Language Found: English
>            Reporter: Adobe JIRA
>            Assignee: Mark Kessler
>         Attachments: test.jpg
>
>
>       Steps to reproduce:
> <?xml version="1.0" encoding="utf-8"?> 
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
>     
>     <mx:Component className="MyTab">
>         <mx:TitleWindow> 
>             <mx:TabNavigator>
>                 <mx:Canvas 
>                     icon="@Embed(source='assets/icons/16/icon16x16.png')"/>
>                 <mx:Canvas 
>                     icon="@Embed(source='assets/icons/16/icon16x16.png')"/> 
>             </mx:TabNavigator>
>         </mx:TitleWindow>
>     </mx:Component>
>     
>     <mx:Button label="Open Tab To See the bug with icons" 
> click="openTabNavIcon()"/> 
>         
>     <mx:Script>
>         <![CDATA[
>             import mx.managers.PopUpManager;
>             import mx.core.IFlexDisplayObject;
>                     
>             public function openTabNavIcon():void { 
>                 var window:IFlexDisplayObject = new MyTab();
>                 PopUpManager.addPopUp(window, this);
>                 PopUpManager.centerPopUp(window);
>             }
>             
>         ]]
>       > 
>     </mx:Script>
> </mx:Application>
>  
>  Actual Results:
>  
> Icons not placed properly until first rollover.
>  
>  Expected Results:
>  
>  
> Workaround (if any):
> Solution 1:
> -----------
> protected function fixIcons(event:Event):void {
> var navigator:TabNavigator = TabNavigator(event.target);
> navigator.addEventListener(MouseEvent.MOUSE_OVER, function():void
> {});
> }
> Solution 2:
> -----------
> protected function fixIcons(event:Event):void {
> var navigator:TabNavigator = TabNavigator(event.target);
> var child:UIComponent;
> for each (child in navigator.getChildren()){
> child.enabled = false;
> }
> for each (child in navigator.getChildren()){
> child.enabled = true;
> }
> }
> ----------------------
> Solution 1 works better for me, because solution 2 doesn't render a
> good button width until the first physical rollOver.
> Of course, you should attach this function as an event listener to
> your <mx:TabNavigator>:
> <mx:TabNavigator
> creationComplete="fixIcons(event)"
> change="onTabChange(event)"
> >
>     

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to