Justin,

For s:DataGrid that isn't how it works.  Look at the doc for dataTipField
and dataTipFunction.  I think you would need to use a dataTipFunction and
decide when to show the tip yourself.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/co
mponents/DataGrid.html#dataTipField


Carol

On 3/21/12 1 :13AM, "Justin Mclean" <jus...@classsoftware.com> wrote:

>Hi,
>
>The documentation for datatips state "DataTips are tooltips designed to
>show the text that is too long for the row."
>
>However currently datatips show up all of the time in
>mx:AdvancedDataGrid, mx:DataGrid, mx:List and s:DataGrid.
>
>The code is implemented correctly in the ListItemRender (and
>DataGridItemRenderer and AdvancedDataGridItemRenderer etc classes) the
>issue is that the dataTipField has a default of "label" which means tool
>tips show for all items.
>
> Here's the relevant code from the ADG item renderer:
>
>                if (!(_data is AdvancedDataGridColumn) && (textWidth >
>width 
>                    || column.dataTipFunction || column.dataTipField
>                    || dg.dataTipFunction || dg.dataTipField))
>                {
>                    toolTip = column.itemToDataTip(_data);
>                }
>                else
>                {
>                    toolTip = null;
>                }
>
>As dg.dataTipField is going to be non null if ignores the textWidth >
>width check. It's similar with the datagrid and the list renderers.
>
>A work around for the mx classes is to do bind or set dataTipField to
>null, this is a bit ugly and I think it would be better to change the
>default value of dataTipField to null (or perhaps add a check of &&
>dataTipField != labelField). I've not been able to work out a work around
>for the s:DataGrid yet.
>
>Anyone have any more info (or an opinion) on this? There's no existing
>JIRA issue in the Adobe bug base that I can find.
>
>Note that s:List doesn't have an issue as it doesn't support dataTips at
>all :-(
>
>Thanks,
>Justin

Reply via email to