[ https://issues.apache.org/jira/browse/FLEX-11491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Kessler closed FLEX-11491. ------------------------------- > 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