2 Replies Latest reply on Apr 27, 2009 1:53 PM by Flex harUI

    PopUpButton not instantiating it's <mx:popUp> UI component untill calling open()


      I'm putting for example bunch of radioButtons in the to the popUp component. The label of PopUpButton is to be set from the default selection of RadioButtonGroup , the problem is all the properties of RadioGroup like the number of children or selection value are null and only until I open the popUpButton they get instantiated !

      The fix is on the creationComplete of PopUpButton to open and close it ! But it's annoying because it might leave some visual artifacts ( may be in future)

      Anyone encountered this problem ?



      <?xml version="1.0" encoding="utf-8"?>

      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationPolicy="all">

                   <mx:PopUpButton id="picker"  label="{rdg.selectedValue}"    >


                             <mx:Box id="pickerBox" creationPolicy="all">

                                   <mx:RadioButtonGroup id="rdg" />

                                   <mx:RadioButton groupName="rdg" value="countA"     label="A" selected="true"/>

                                   <mx:RadioButton groupName="rdg" value="count_B" label="B"/>

                                   <mx:RadioButton groupName="rdg" value="count_C" label="C"/>

                                   <mx:RadioButton groupName="rdg" value="count_D" label="D"/>