0 Replies Latest reply on Jan 25, 2008 3:53 PM by reedf

    Flex 3 HDividedBox and PopupButton

    reedf
      Does this look like a bug or am I doing something obviously wrong? Thanks for any help!

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="initMenus();">
      <mx:Script>
      <![CDATA[
      import mx.controls.Menu;

      private function initMenus():void
      {
      var menu1:Menu = new Menu();
      menu1.dataProvider = [{label: "View 1, Item 1"}, {label: "View 1, Item 2"}, {label: "View 1, Item 3"}];
      pop1.popUp = menu1;

      var menu2:Menu = new Menu();
      menu2.dataProvider = [{label: "View 2, Item 1"}, {label: "View 2, Item 2"}, {label: "View 2, Item 3"}];
      pop2.popUp = menu2;
      }
      ]]>
      </mx:Script>
      <mx:VBox width="100%" horizontalAlign="left">
      <mx:Label text="These first 5 steps seem to work just fine." fontStyle="italic"/>
      <mx:Label text="1. Click View 1 Dropdown"/>
      <mx:Label text="2. Click View 2 Dropdown"/>
      <mx:Label text="3. Move slider to the Left"/>
      <mx:Label text="4. Click View 1 Dropdown"/>
      <mx:Label text="5. Click View 2 Dropdown"/>
      <mx:Spacer height="5"/>
      <mx:Label text="Steps 7 and 8 below have been failing for me...no menu anymore after moving the slider to the right." fontStyle="italic"/>
      <mx:Label text="6. Move slider to the Right"/>
      <mx:Label text="7. Click View 1 Dropdown"/>
      <mx:Label text="8. Click View 2 Dropdown"/>
      </mx:VBox>
      <mx:DividedBox direction="horizontal" width="100%" height="100%">
      <mx:VBox width="100" height="100%" backgroundColor="0xCCCCCC" paddingLeft="10" paddingTop="10">
      <mx:LinkButton label="View 1" click="view.selectedChild=view1"/>
      <mx:LinkButton label="View 2" click="view.selectedChild=view2"/>
      </mx:VBox>
      <mx:VBox height="100%" backgroundColor="0xCCCCCC">
      <mx:ViewStack id="view" width="100%" height="100%" creationPolicy="all">
      <mx:VBox id="view1" paddingLeft="10" paddingTop="10">
      <mx:PopUpButton id="pop1" label="View 1 Dropdown"/>
      </mx:VBox>
      <mx:VBox id="view2" paddingLeft="10" paddingTop="10">
      <mx:PopUpButton id="pop2" label="View 2 Dropdown"/>
      </mx:VBox>
      </mx:ViewStack>
      </mx:VBox>
      </mx:DividedBox>
      </mx:Application>