Flex的DataGrid中不想要的数据提示出现 [英] Flex DataGrid not wanted DataTip appears

查看:80
本文介绍了Flex的DataGrid中不想要的数据提示出现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

附,你会发现一个小项目,以显示这个问题,有一个screenshow以及在压缩。 http://imageshack.us/photo/my-images/21/screenhunter50jan140842。 JPG /

Attached you will find a small project to show the issue, there is a screenshow as well in the zip. http://imageshack.us/photo/my-images/21/screenhunter50jan140842.jpg/

上传与[URL = HTTP://imageshack.us] ImageShack.us [/ URL]   - 当你不断刷新的dataProvider 数据网格的/的AdvancedDataGrid 不需要的数据提示显示。   - 在截图中可以看到鼠标光标放在先进数据网格的第一列。而一个工具提示显示。   - 在C showDataTips =假的$ C $第一列。   - 同样是在常规数据网格。 (尽管有时在提示只是闪烁)   - 没有问题,与MX一个

Uploaded with [URL=http://imageshack.us]ImageShack.us[/URL] - When you constantly refresh dataProvider of a datagrid/advanceddatagrid unwanted datatips are shown. - In the screenshot you can see the mouse cursor on the first column of the advanced data grid. And a tooltip is show. - In the code the showDataTips="false" for the first column. - Same is on the regular data grid. ( Though sometimes the tooltip is just flickering ) - No issue with the MX one.

链接到演示项目: https://dl.dropbox.com/ U / 5516677 /数据提示%20issue.7z

感谢你们。

推荐答案

我已经找到了问题。这就是柔性的错误。当数据网格的dataProvider被改变,渲染器从高速缓存换成别人,但仍提示从previous渲染,现在是看不见的。 我提出了一个解决方法。我刚刚overrided工具提示二传手的​​渲染,检查其知名度。

I've found the problem. This is exactly the flex's bug. When the dataProvider of DataGrid is changed, renderers are replaced by others from cache, but tooltip remains from previous renderer, which is invisible now. I propose a workaround. I've just overrided toolTip setter for renderer to check its visibility.

<mx:AdvancedDataGrid id="secoind" left="300" top="20" width="200" height="200" dataProvider="{dta}" showDataTips="false">
        <mx:groupedColumns >
            <mx:AdvancedDataGridColumnGroup >
                <mx:AdvancedDataGridColumn dataField="name" headerText="Name" showDataTips="false">
                    <mx:itemRenderer>
                        <fx:Component>
                            <mx:AdvancedDataGridItemRenderer>
                                <fx:Script>
                                    <![CDATA[
                                        override public function set toolTip(value:String):void
                                        {
                                            super.toolTip = visible ? value : null;
                                        }
                                    ]]>
                                </fx:Script>
                            </mx:AdvancedDataGridItemRenderer>
                        </fx:Component>
                    </mx:itemRenderer>
                </mx:AdvancedDataGridColumn>
                <mx:AdvancedDataGridColumn dataField="text" headerText="Text" showDataTips="true"/>
            </mx:AdvancedDataGridColumnGroup>
        </mx:groupedColumns>
    </mx:AdvancedDataGrid>

这篇关于Flex的DataGrid中不想要的数据提示出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆