0 Replies Latest reply on Aug 20, 2007 7:18 AM by bryan_blackman

    Assigning a child button to Accordion header

      I have an Accordion control with several panels. Each header has an icon and a title. I need to add a child button to the Accordion header (which is a Button itself and not a container, but it should be OK). I want to place it on te right side of the header. I create a 20 x 20 button and add it to the Accordion header, as a child. I want to place it on the right corner of the Accordion header, but I am unable to get accurate size measurements of the header. What I thought would work (using the Accordion derived custom class) would be ....

      for(var i:int=0; i<numChildren; i++)
      var header:mx.controls.Button = getHeaderAt(i);

      minusButton.x = header.measuredWidth - 20;

      but the measureed width always comes up as zero, as opposed to the actual width of the header? Any ideas what I am doing wrong?