1 package net.systemeD.controls {
2 import mx.controls.Label;
3 import mx.controls.listClasses.*;
4 import flash.display.DisplayObject;
5 import mx.controls.Image;
7 public class DataGridWarningField extends Label {
9 private var _image:Image;
10 [Embed(source="../../../embedded/warning.png")] private var warningIcon:Class;
12 function DataGridWarningField():void {
14 setStyle('paddingLeft',2);
17 override protected function createChildren():void {
18 super.createChildren();
20 _image.source = warningIcon;
23 addChild(DisplayObject(_image));
26 override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
27 super.updateDisplayList(unscaledWidth, unscaledHeight);
29 if (data.value && data.value.indexOf(';')>-1) {
30 setStyle('color',0xFF0000);
32 _image.x = width -_image.width -5;
33 _image.y = height-_image.height-3;
34 _image.toolTip = "The tag contains more than one value - please check";
35 textField.width = width-_image.width-5;