You don't need a custom event as MouseEvent.CLICK already bubbles.
Simply listen for that event and then check if(event.target is
CenteredCheckBox).

HTH,
Ben


--- In [email protected], "candysmate" <[EMAIL PROTECTED]> wrote:
>
> I'm using a custom itemRenderer (centered checkBox), based upon Alex
> Harui's  excellent blog in a dataGrid.
> 
> My dataGridColumn has:
> 
> <mx:DataGridColumn
>                                                                       
> headerText=""
>                                                                       
> dataField="select"
>                                                                       
> width="30"
>                                                                       
> itemRenderer="com.toro.classes.CenteredCheckBox">
>                                                                
> </mx:DataGridColumn>           
> 
> the class is:
> 
> package com.toro.classes
> {
> import flash.display.DisplayObject;
> import flash.text.TextField;
> import mx.controls.CheckBox;
> 
> public class CenteredCheckBox extends CheckBox
> {
> 
>       public function CenteredCheckBox()
>       {
>               super();
>       }
> 
>       /**
>        *  center the contentHolder
>        */
>       override protected function updateDisplayList(w:Number, h:Number):void
>       {
>               super.updateDisplayList(w, h);
> 
>               var n:int = numChildren;
>               for (var i:int = 0; i < n; i++)
>               {
>                       var c:DisplayObject = getChildAt(i);
>                       if (!(c is TextField))
>                       {
>                               c.x = (w - c.width) / 2;
>                               c.y = 0;
>                       }
>               }
>       }
> 
> }
> 
> }
> 
> How can I get the boolean value held in array portion 'select' for the
> dataProvider 'coloursArray' toggle when the checkbox is
> selected/unselected please?
>


Reply via email to