I tried, but I have imagerenderer on one of the datafiled as class and its getting bugged when i do that. If i close the window and reopen it again everything is fine!
See this:
http: //img196.imageshack.us/img196/977/29544197.png
http: //img573.imageshack.us/img573/8310/27297576.png
Those images are powered by:
Code:
package
{
import mx.containers.HBox;
import mx.controls.Image;
import mx.controls.Label;
import mx.controls.dataGridClasses.*;
public class ImageRenderer extends HBox
{
private var imageReference:Image = null;
private var img:Image = new Image();
private var lbl:Label = new Label();
override public function set data(value:Object):void
{
if(value != null && imageReference == null)
{
if(value.read == false) {
img.source = "img/assets/newmail.png";
img.toolTip = "New Mail";
}
else
{
img.source = "img/assets/oldmail.png";
img.toolTip = "Old Mail";
}
}
addChild(img);
imageReference = img;
setStyle("verticalAlign", "middle");
setStyle("paddingLeft","2");
}
}
}