Home Tutorials Forums Articles Blogs Movies Library Employment Press
Prev Previous Post   Next Post Next
Old 02-17-2012, 11:54 PM   #1
Registered User
Join Date: Nov 2009
Posts: 25
Default Image in DataGrid

Hi all,

This cannot possibly be this difficult, but I cannot figure it out...

I have a DataGrid with a custom ItemRenderer in it. The renderer puts a label above an image, where the label displays the filename of the image.

The cells of my DataGrid are 500x350, with 10px padding all around. My images could be 40x40 or 1024x748 or anything in-between.

I want the images that are smaller than 500x350 to display with no modification, and the images larger than 500x350 to scale (with proper aspect) to fit the area.

I have tried setting height and width on the Image tag, along with scaleMode, fillMode and verticalAlign, but then all of the images get modified (large ones shrink as expected, but small ones are blown up).

If I do not set the scale and fill modes, but do set the height and width, the large images scale down, but leave a huge gap above them so you can barely see them in the cell.

This just cannot be that difficult to do... what am I missing??


Raconteur is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 10:02 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.