Alex.
Thats fantastic!! it works. My earlier efforts using containers is a 
great way to start but your way takes it to another level.

btw thanks to carlos and carsten for contributing

cheers
bod

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> FWIW, I put an example on my blog:
> 
http://blogs.adobe.com/aharui/2007/04/more_thinking_about_item_rende.
htm
> l
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of bhaq1972
> Sent: Thursday, April 05, 2007 1:03 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: datagrid image itemRenderers don't
> maintainAspectRatio
> 
>  
> 
> Thanks Alex. That works except the image appears left aligned. I'd 
> like it to be centre aligned. 
> 
> horizontalAlign=center doesn't work. 
> 
> any more ideas
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com>
> , "Alex Harui" <aharui@> wrote:
> >
> > You could subclass Image, override updateDisplayList and set the
> > contentHolder's width/height afters super.updateDisplayList
> > 
> > ________________________________
> > 
> > From: flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com>
> 
> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com>
> ] On
> > Behalf Of bhaq1972
> > Sent: Wednesday, April 04, 2007 7:54 AM
> > To: flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com> 
> > Subject: [flexcoders] Re: datagrid image itemRenderers don't
> > maintainAspectRatio
> > 
> > 
> > 
> > I've tried everything you suggested but doesn't work for me. 
> thanks 
> > anyway.
> > 
> > --- In flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com>  <mailto:flexcoders%
> 40yahoogroups.com>
> > , "Dexter18" <cbforen@> wrote:
> > >
> > > may set the height and the width of your image component. 
either 
> to
> > > fixed size or to values from yout loaded image.
> > > 
> > > then you can set -horizontalAlign="center"- and the
> > > -verticalAlign="middle"- props of the image component to 
center 
> > your
> > > image.
> > > you dont need a wrapper component like a hbox or s.th. similar.
> > > 
> > > when this not helps, i always set -maintainAspectRaio="true"- 
> > > 
> > > 
> > > carsten
> > > 
> > > --- In flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com> 
> > <mailto:flexcoders%40yahoogroups.com> , "bhaq1972" <mbhaque@> 
> wrote:
> > > >
> > > > I've got a image based component i'm using as an itemRenderer
> > > > eg
> > > > 
> > > > dgImage.mxml
> > > > ------------
> > > > <mx:Image>
> > > > etc
> > > > </mx:Image>
> > > > 
> > > > its all working, but the images look large and blurry.
> > > > 
> > > > However, if i wrap with an hbox eg
> > > > 
> > > > <mx:HBox>
> > > > <mx:Image/>
> > > > </mx:HBox>
> > > > 
> > > > the images look perfect. I didn't have a problem with this 
> until 
> > i 
> > > > read Alex Harui's blog regarding performance issues using 
> > containers 
> > > > in itemRenderes.
> > > > 
> > > > is there another way i can prevent blurry images?
> > > >
> > >
> >
>


Reply via email to