Flex Datagrid 内容超出 column 宽度显示 tooltip
package {import mx.controls.dataGridClasses.DataGridItemRenderer;public class TruncateText extends DataGridItemRenderer {private var textTruncated:Boolean = false;private var originalText:String;public function TruncateText(){super();}override public function set text(value:String):void{super.text = value;originalText = value;textTruncated = truncateToFit();}override public function validateProperties():void{super.validateProperties();this.wordWrap=false;this.setStyle("paddingTop",0);this.setStyle("paddingBottom",0);this.setStyle("paddingLeft",0);this.setStyle("paddingRight",0);toolTip = textTruncated ? originalText : null;}}}