4 Replies Latest reply on Sep 18, 2009 2:13 PM by Jacob G

    Bug: Dropdownlist in popup

    flairjax Level 1

      So I have a dropdownlist in my app that is in a popup, but when you click the dropdownlist and the popupanchor is activated the dropdown shows up in the top left corner of the app.  Not doing anything special?

       

      I really shouldn't have to alter the skin setting the popupanchor position, correct?  Shouldn't this remain near the dropdownlist?

       

      <s:DropDownList id="dropDownList"
                  labelField="label"
                  requiresSelection="true"

                  >
              <s:dataProvider>
                  <s:ArrayList>
                      <s:BitmapImage source="@Embed('assets/images/print.png')" />
                      <s:BitmapImage source="@Embed('assets/images/save.png')" />
                      <s:BitmapImage source="@Embed('assets/images/print.png')" />
                      <s:BitmapImage source="@Embed('assets/images/print.png')" />
                  </s:ArrayList>
              </s:dataProvider>
         </s:DropDownList>

        • 1. Re: Bug: Dropdownlist in popup
          Peter deHaan Level 4

          dallas,

           

          Out of curiosity, which version of the Flex 4 SDK are you using?

          I was unable to repro on a simple test case w/ build 4.0.0.10237.

           

          Peter

           

          <?xml version="1.0" encoding="utf-8"?>
          <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/halo">
              <fx:Script>
                  <![CDATA[
                      import mx.managers.PopUpManager;
                      protected function button1_clickHandler(evt:MouseEvent):void {
                          PopUpManager.addPopUp(pnl, this, true);
                          PopUpManager.centerPopUp(pnl);
                      }
                  ]]>
              </fx:Script>
              <fx:Declarations>
                  <s:Panel id="pnl" width="200" height="200">
                      <s:controlBarContent>
                          <s:DropDownList id="ddl" requireSelection="true">
                              <s:dataProvider>
                                  <s:ArrayList source="[The,Quick,Brown,Fox,Lazy,Dog]" />
                              </s:dataProvider>
                          </s:DropDownList>
                          <s:Button label="Close" click="PopUpManager.removePopUp(pnl);" />
                      </s:controlBarContent>
                  </s:Panel>
              </fx:Declarations>
              <s:Button click="button1_clickHandler(event);" />
          </s:Application>
          
          • 2. Re: Bug: Dropdownlist in popup
            Jacob G Adobe Employee

            I'm not sure I fully understand what you are trying to do but if you can explain a little further I can look into the issue for you.  Can you either file a bug in our bug database (https://bugs.adobe.com/flex/) and/or post a bug file here that demonstrates what you're seeing (along with the images you are using in the dataProvider)?  It would also help if you could note which version of the SDK you are using.

             

            If you are just using the DropDownList component itself, like the code sample you included in your question, the dropDown should appear below the anchor button by default (i.e. without you having to set anything).  The default DropDownList skin has popUpPosition set to below.

             

            I tried to reproduce this issue locally and was unable to, so I would need a bug file that shows the issue to look at this further.

            • 3. Re: Bug: Dropdownlist in popup
              flairjax Level 1

              Updated to stable build but getting compile errors now.  http://forums.adobe.com/thread/492710?tstart=0

               


              Will update this once I work throught these.

               

              TIA, J

              • 4. Re: Bug: Dropdownlist in popup
                Jacob G Adobe Employee

                If you still have problems please let me know.

                 

                There is also an open issue regarding DropDownList that may be related to what you are seeing:

                https://bugs.adobe.com/jira/browse/SDK-22630