views:

40

answers:

2

Hi!

I think it is a question easy to answer, so I'll put it quick:

Which parameter should I put not to automatically resize an Image that is put on an ItemRenderer?

Ex (in which the image gets resized):

<mx:AdvancedDataGridColumn headerText="estado" dataField="estado" width="30"
editable="false" resizable="false">
    <mx:itemRenderer>
        <mx:Component>
<mx:Image source="{Settings.AdoQUrl + Settings.imgFolder + 'adm/ofe.'
+ data.estado + '.png'}">
            </mx:Image>
        </mx:Component>
    </mx:itemRenderer>
</mx:AdvancedDataGridColumn>

Thanks!

+1  A: 

Try putting it in a Canvas. Most likely the Canvas will resize to fill the content space of the grid, but the canvas's children won't.

<mx:AdvancedDataGridColumn headerText="estado" dataField="estado" width="30"
editable="false" resizable="false">
    <mx:itemRenderer>
        <mx:Component>
<mx:Canvas>   
<mx:Image source="{Settings.AdoQUrl + Settings.imgFolder + 'adm/ofe.'
    + data.estado + '.png'}">
                </mx:Image>
            </mx:Component>
</mx:Canvas>   
        </mx:itemRenderer>
    </mx:AdvancedDataGridColumn>
www.Flextras.com
A: 

Hi huff

Have you tried setting variableRowHeight="true" on your AdvancedDataGrid component?

Here's the documentation for AdvancedDataGrid, the variableRowHeight property is inherited from the AdvancedListBase class, but you can use it in a similar way in components like DataGrid and List (et al) too.

Danny Kopping