I had succes with:

   public class CpPiechartLegendItem extends LegendItem
     {
...
         protected override function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void {
             super.updateDisplayList(unscaledWidth, unscaledHeight);
             super.setActualSize(unscaledWidth+40, unscaledHeight);
             super.marker.move(25, super.marker.y);
 
             var label:UITextField =  this.getChildAt(0) as UITextField;
             label.move(40, label.y);

         }
     }

If LegendItem objects are created automatically using the dataProvider
property of the Legend, the label is at position #1, position #0 will return
null.

...
 
             var label:UITextField =  this.getChildAt(1) as UITextField;
             label.move(40, label.y);

 ...


-- 
View this message in context: 
http://www.nabble.com/Custom-Legend%3A-Extending-LegendItem%3A--How-do-I-move-the-label--tf3508625.html#a10077256
Sent from the FlexCoders mailing list archive at Nabble.com.

Reply via email to