2 Replies Latest reply on May 16, 2006 11:45 PM by AnantG

    PopUpMenuButton problems

    Joe_Casey Level 1
      I have 2 related problems with PopUpMenuButtons. Here is an application that illustrates them:
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute">
      <mx:HBox height="100">
      <mx:PopUpMenuButton label="Options" labelField="@label"
      dataProvider="{optionXML}" showRoot="false"/>
      </mx:HBox>
      <mx:Script><![CDATA[
      [Bindable]
      private var optionXML:XML =
      <menuitem label="Options">
      <option label="First" data="1"/>
      <option label="Second" data="2"/>
      </menuitem>;
      ]]></mx:Script>
      </mx:Application>
      First problem: if the currently selected menu item is re-selected , the PopUp does not go away. A change event (not shown here) occurs properly, but the dead image of the PopUp remains where it was. Mousing over it erases it pixel by pixel.

      Second problem: The documentation says that showRoot is false by default. However, this is not the case. It must be explicitly set to false, otherwise the behavior is showRoot=true.

      Relationship between the first and second problems: If showRoot is true, so the first popup requires clicking to show a second popup, then the first problem goes away - the background is redrawn properly. However, I want showRoot=false, so this does not help me.

      Please advise.
        • 1. Re: PopUpMenuButton problems
          AnantG Level 1
          Hi Joe,

          The first problem is a bug in Beta3 and has been fixed in the internal builds. The workaround for now is to click the right button to close the menu.
          The second is also a bug is also a bug which has been fixed, however the default value of showRoot may change.
          • 2. Re: PopUpMenuButton problems
            AnantG Level 1
            Hi Joe,

            The first problem is a bug in Beta3 and has been fixed in the internal builds. The workaround for now is to click the right button to close the menu.
            The second is also a bug is also a bug which has been fixed, however the default value of showRoot may change.

            Thanks,
            Anant.