Can you add an eventlistner to the vbox so that when the mouse key clicks you get a function call?
for example; <?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"> <mx:Script> <![CDATA[ import mx.controls.Alert; private function init():void { vboxtest.addEventListener(MouseEvent.MOUSE_DOWN,mouseDidSomething); } private function mouseDidSomething(event:MouseEvent):void { Alert.show("mouse it"); } ]]> </mx:Script> <mx:VBox id="vboxtest" borderStyle="solid" width="300" height="300"> </mx:VBox> </mx:WindowedApplication> --- In flexcoders@yahoogroups.com, Angelo Anolin <angelo_ano...@...> wrote: > > Could you try to declare the double click event on the datagrid, i.e. > > <mx:DataGrid id="myDataGrid" doubleClick="yourDoubleClickFunction()"> > <mx:columns> > ......... > </mx:columns> > </mx:DataGrid> > > and in your script, declare the function > > private function yourDoubleClickFunction():void > { > // Place your codes here.. > } > > HTH. > > > > > ________________________________ > From: ferrari.hunk <ferrari.h...@...> > To: flexcoders@yahoogroups.com > Sent: Wednesday, 9 September, 2009 22:43:28 > Subject: [flexcoders] Double click on Datagrid cell > > > Hi, > > I'm developing an application where I'm using a datagrid that shows some > information from an xml. Every cell in the grid is of the form > <itemRenderer> > <compoment> > <Vbox> > <HBox> > <Text/> //some text goes within this block > <Text/> //some text goes within this block > <Text/> //some text goes within this block > </Hbox> > </VBox> > </component> > </itemRenderer> > > I have set a function call for the datagrid on ItemDoubleClick event; and > this even gets triggered only when i double click on any TEXT that is on the > cell; and NOT on any part of the cell. However, I would like to have this > triggered when the user clicks anywhere in the cell. > Sombody please help, > > Thanks!! >