If you set variableRowHeight="true" on the DataGrid, the rows will 
also resize with the zoom efeects.

-TH

--- In flexcoders@yahoogroups.com, "Jason Szeto" <[EMAIL PROTECTED]> wrote:
>
> Pan,
> 
>  
> 
>             You are actually running into a scoping problem. You 
don't
> get an error because your effectTriggers are using strings instead 
of
> effect instances. Try changing rollOverEffect="zoomIn" to
> rollOverEffect="{zoomIn}". You should get an error complaining that
> zoomIn doesn't exist. 
> 
>  
> 
> The problem is that when you use inline components, the component 
must
> be self-contained. It has no access to objects in the parent app. 
If you
> move the two zoom effects into the VBox component, then your 
effects
> will play. I've included an updated version. Notice that I had to 
set
> the scrollPolicy of the VBox to prevent scrollbars from appearing 
during
> the zoom. 
> 
>  
> 
> <?xml version="1.0" encoding="utf-8"?>
> 
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> layout="absolute">
> 
>  
> 
>   <mx:ArrayCollection id="dataSet"> 
> 
>     <mx:source>
> 
>  
> 
<mx:Object><mx:Month>January</mx:Month><mx:Costs>20</mx:Costs></mx:Ob
jec
> t>
> 
>  
> 
<mx:Object><mx:Month>February</mx:Month><mx:Costs>60</mx:Costs></mx:O
bje
> ct> 
> 
>  
> 
<mx:Object><mx:Month>March</mx:Month><mx:Costs>90</mx:Costs></mx:Obje
ct>
> 
>     </mx:source>
> 
>   </mx:ArrayCollection>
> 
>  
> 
>   <mx:DataGrid id="grid" dataProvider="{dataSet}" width="100%"
> height="100%"> 
> 
>     <mx:columns>
> 
>      <mx:DataGridColumn>
> 
>       <mx:itemRenderer>
> 
>        <mx:Component>
> 
>                  <mx:VBox verticalScrollPolicy="off"
> horizontalScrollPolicy="off">
> 
>                                       <mx:Zoom id="zoomIn"
> zoomWidthTo="2" zoomHeightTo="2" /> 
> 
>                                       <mx:Zoom id="zoomOut"
> zoomWidthTo="1" zoomHeightTo="1" />
> 
>             <mx:Text text="some text" width="100%"
> rollOverEffect="{zoomIn}" rollOutEffect="{zoomOut}"/> 
> 
>           </mx:VBox>
> 
>        </mx:Component>
> 
>       </mx:itemRenderer> 
> 
>      </mx:DataGridColumn> 
> 
>      <mx:DataGridColumn dataField="Month"/>
> 
>      <mx:DataGridColumn dataField="Costs"/> 
> 
>     </mx:columns>
> 
>   </mx:DataGrid>
> 
> </mx:Application>
> 
>  
> 
> Jason
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Pan Troglodytes
> Sent: Monday, June 19, 2006 1:07 PM
> To: flexcoders
> Subject: [flexcoders] adding zoom effect to datagrid row
> 
>  
> 
> I'm having a real time trying to get a rolloverEffect to work on a
> datagrid.  What I want is for the text to zoom a little bit when 
rolled
> over.  Here's my code:
> 
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> layout="absolute">
>   <mx:ArrayCollection id="dataSet"> 
>     <mx:source>
>  
> 
<mx:Object><mx:Month>January</mx:Month><mx:Costs>20</mx:Costs></mx:Ob
jec
> t>
>  
> 
<mx:Object><mx:Month>February</mx:Month><mx:Costs>60</mx:Costs></mx:O
bje
> ct> 
>  
> 
<mx:Object><mx:Month>March</mx:Month><mx:Costs>90</mx:Costs></mx:Obje
ct>
>     </mx:source>
>   </mx:ArrayCollection>
>   <mx:Zoom id="zoomIn" zoomWidthTo="2" zoomHeightTo="2" /> 
>   <mx:Zoom id="zoomOut" zoomWidthTo="1" zoomHeightTo="1" />
> 
>   <mx:DataGrid id="grid" dataProvider="{dataSet}" width="100%"
> height="100%"> 
>     <mx:columns>
>      <mx:DataGridColumn>
>       <mx:itemRenderer>
>        <mx:Component>
>           <mx:VBox>
>             <mx:Text text="some text" width="100%"
> rollOverEffect="zoomIn" rollOutEffect="zoomOut"/> 
>           </mx:VBox>
>        </mx:Component>
>       </mx:itemRenderer> 
>      </mx:DataGridColumn> 
>      <mx:DataGridColumn dataField="Month"/>
>      <mx:DataGridColumn dataField="Costs"/> 
>     </mx:columns>
>   </mx:DataGrid>
> </mx:Application>
> 
> But the effect never happens.  I've tried a lot of different 
variations
> with no luck.
> 
> -- 
> Jason
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to