3 Replies Latest reply on Aug 25, 2010 12:23 AM by BhaskerChari

    Dynamically change PopUpButton's popup width?

    johnnymurphy

      Anyone know how to solve the problem where when you open a PopUpButton's popup, you can dynamically make the width larger than the opening width.  I have attached example code with a slider that is bound to the width of the popup and if you play with it, you will notice that you can easily drag the width smaller but you cannot drag the width larger than the original popup width.  Is this a limitation of Flex or a bug of the PopUpButton?

       

      Thanks for any advice or workarounds anyone can offer...   I have attached the code below. 

       

      menu.gif

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application layout="vertical"
                      backgroundColor="white" verticalAlign="middle"
                      xmlns:mx="http://www.adobe.com/2006/mxml">
      
          <mx:PopUpButton id="myPopUpButton"
                          label="Open">
              <mx:popUp>
                  <mx:Canvas id="canvasPopUp"
                             width="{slider.value}" height="150"
                             horizontalScrollPolicy="off"
                             backgroundColor="#cccccc">
                      <mx:HSlider id="slider"
                                  x="10" y="10"
                                  liveDragging="true" maximum="400" minimum="50" snapInterval="1" tickInterval="50" value="250"/>
                  </mx:Canvas>
              </mx:popUp>
          </mx:PopUpButton>
      
      </mx:Application>