3. Width and height are properties of Image, not styles, so setStyle() won't work.
--- In flexcoders@yahoogroups.com, Chris <zomgfore...@...> wrote: > > I am assuming that your list control has a set width and height. If you have > variableRowHeight=true, or you want a variable row height, then this answer > probably isn't what you are after. > > 1. Currently you are using Image as a base class. The way item renderers > work, the width, height, and background can be controlled by the item > renderer's parent. I think you would want to wrap your Image within a > canvas, so that the image's dimensions won't be controlled by the parent, > and can instead be set by you. The parent of the renderer will set the > width/height of the canvas, and you can set the image width/height. > > 2. I don't know what a PopupMenu is. Is that the dropdown that is created by > a ComboBox? > > > On Fri, Nov 20, 2009 at 8:42 AM, Thomas Silvester thomas_...@...wrote: > > > > > > > Hi All, > > I have 2 questions? > > 1.I would like to chnage the width and height of an image using an Imagae > > renderer, how do i do that? > > 2. Can I chnage the widht or height of a POPUPMenu using the same style as > > below uing a renderer. > > > > Any information regarding this is appreciated. > > Thanks in Advance, > > Anitha. > > > > I tried this, but it did not chnage the width or height of the image.. > > > > * > > > > package > > * > > > > { > > > > *import* mx.controls.*; > > > > *public* *class* ImageRenderer *extends* Image > > > > { > > > > > > > > *private* *var* slaimage:Image; > > > > *public* *function* ImageRenderer() > > > > { > > > > *super*(); > > > > } > > > > *override* *public* *function* *set* data(value:Object) :*void* > > > > { > > > > *if*(value != *null*) > > > > { > > > > *super*.data = value; > > > > slaimage= > > *new* Image(); > > > > slaimage.source=value.CurrentSLA; > > > > slaimage.setStyle( > > *"width"*,15); > > > > slaimage.setStyle(*"height"* > > ,15); > > > > } > > > > } > > > > > > >