Display dataTip on a datagrid if text is truncated.

Many people are having problem to display dataTip on a Datagrid only if the text is truncated. The best solution I found to use Label as an itemRenderer. we also need to set truncateToFit property of an Label to true.

Following example explains how to use itemRenderer in a dataGrid, it also explains how to show datatip only if the text is truncated.

we could have one extended Label class LabelRenderer
———————————————–
//LebelRenderer..
package
com.subrat
{
  import mx.controls.Label;
  public class LabelRenderer extends Label
  {
    public function LabelRenderer()
     {
      super();
     this.truncateToFit=true;
     }
  }

}
——————————————————-
Usage:
 

<?xml version=”1.0″ encoding=”utf-8″?>

 

 

<mx:VBox xmlns:mx=”http://www.adobe.com/2006/mxml” width=”400” height=”300><mx:XML id=”itemsXML>
<items>
<item name=”Item 1″ description=”dummy description for Item 1″ />
<item name=”Item 2″ description=”dummy description for Item 2″ />
<item name=”Item 3″ description=”dummy description for Item 3″ />
<item name=”Item 4″ description=”dummy description for Item 4″ />
</items>
</mx:XML>
<mx:DataGrid dataProvider=”{itemsXML.item}><mx:columns>
<mx:DataGridColumn dataField=”@name” headerText=”Name/>
<mx:DataGridColumn dataField=”@description” headerText=”Description” itemRenderer=”com.subrat.LabelRenderer/>
</mx:columns>
</mx:DataGrid>
</mx:VBox>

 

 

Evolution

Evolution

Flash CS4: Design with ease and efficiency

Bring your designs to life with intuitive new animation tools that make your work easier and more efficient. Streamline your workflow with an improved user interface and a powerful coding environment. The feature of CS 4 are :

  • Optimized animation tools (object base animation)
  • Rich drawing capabilities
  • Intuitive user interface
  • Streamlined workflow : it support Adobe Pixel Bendernew, Adobe Photoshop and Illustrator import,Animation conversion to ActionScript, Animation copy and paste
  • Timesaving coding tools
  • Advance debugger
  • Improved Adobe software integration
  • Online services like Adobe Kuler and Adobe Bridge .

get a trial : https://www.adobe.com/cfusion/tdrc/index.cfm?loc=en&product=flash

Open Source IDE for Flex and AS3

You can download free IDE for Flex and Flash on flashdevelop. flashdevelop is a open source community. The IDE supports:

  • Enviornment like Flex builder
  • Code Hint
  • Project templates
  • take less resources compare to Flex builder.

issue of environment

Protect our earth.
The girl who silenced the world for 5 minutes
Must Watch. Nice Video.

Adobe Media Player V2 comming soon

Good News !!! Adobe Media Player V2 is going to Launch soon. See you all Enjoying the music with Adobe.

Ted Recomended fantasticcontraption

Ted Petrick has recommended http://fantasticcontraption.com/ for MAX Registration. I personally appreciate Ted comment. Visit this, it’s full of physics fun. amazing site.

Joined Facebook

Hey!!! Today I have joined facebook. Amazing site. Visit my facebook profile.

registered domain subratkumar.com

Hi, Nice to inform you that i have registered my new domain http://www.subratkumar.com. Soon you will see it upgraded with full of information.
Cheers :)

Free MAX 2008 registration

Hi,
All Flex Lovers, there is a good chance to be a part of Flex 3 Contributer. Solve any 3 bugs from Flex bug List and chance to win free Flex books and Free MAX 2008 registration.
For every 3 bugs where we accept and commit your submitted patch, we will purchase an Adobe-related book from your Amazon wish list (once you’ve had your 3rd patch accepted we’ll reach out to you to find your wish list).
There are milestone releases of the Flex 3 SDK planned for the Summer and Fall of 2008. Wouldn’t it be cool if you were able to say that you had a part in them?