So there seems to be a bug in the view stack not redrawing it's children, or a bug in the popupbutton.
The dropdown menu is not being cleared. The only way to avoid it is to add the menu as a child to the popupbuttons parent container and don't include it in the layout.
See below code. Run it an click the popupbutton to see the effect. Then uncomment the addchild and include in layout code and run again to see the temp solution.
This is not view stack container specific i.e. same problem on Vbox, Hbox, Controlbar, ApplicationControlbar, Box, Canvas etc..
On the other hand it may very well be the only way to do it. If this is true update the documentation to specify so.
Code test:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute"><mx:Script>
<![CDATA[
import mx.controls.Menu;
import mx.events.MenuEvent;
private var actionMenu:Menu;private function initMenu():void {
actionMenu = new Menu();
//actionMenu.includeInLayout = false;
//tools.addChild(actionMenu);
var actionMenuDS:Object = [{label: "Complete selected"}, {label: "Delete selected"}, {label: "Export list"}];
actionMenu.width = actionList.width;
actionMenu.dataProvider = actionMenuDS;
actionMenu.addEventListener("change", handleChange);
actionList.popUp = actionMenu;
}//Execute the action reqested and update the control display
private function handleChange(event:MenuEvent):void {
actionList.label = event.menuItem.label ;
actionList.close();
}
]]>
</mx:Script><mx:ViewStack height="100%" id="Cont" width="100%">
<mx:Canvas id="tools" width="100%" height="34" borderStyle="solid" backgroundColor="#c0c0c0">
<mx:PopUpButton textAlign="left" id="actionList" cornerRadius="0" label="Actions" width="155" creationComplete="initMenu();"/>
</mx:Canvas>
</mx:ViewStack></mx:Application>
Any thoughts ??
Jason
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

