My images are in an Advanced DataGridColumn and that coulmn has a width, but if 
i chnage that width to a very small value the column header becomes in 
visible , so i do not want to do that, instead i have an Image renderer for the 
ADvDataGridColumn which has this Image. but setting the style attribute width 
like below did not work for me.
thanks, 
Anitha.
--- On Fri, 11/20/09, Chris <[email protected]> wrote:


From: Chris <[email protected]>
Subject: Re: [flexcoders] Is thereany way using a Image Renderer ,I can change 
the widtth or height of an image?
To: [email protected]
Date: Friday, November 20, 2009, 9:42 PM


  



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_...@yahoo. com> 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); 


} 
} 

 






Reply via email to