首页 > 其他 > 详细

flex datagrid itemrender wordwrap失效

时间:2014-11-29 11:39:28      阅读:423      评论:0      收藏:0      [点我收藏+]

现在我是想把datagrid中的部分字体变个颜色。

但是重写set data函数后发现原先的wordwrap自动换行不好使了。

于是就在谷歌上找问题。。

参考了两篇:

http://stackoverflow.com/questions/8134521/itemrenderer-is-cancelling-wordwrap-setting-on-datagrid

https://shardulbartwal.wordpress.com/2010/12/15/datagrid-with-multiline-variable-height-text-item-renderer-in-flex/#comment-2726

 

都是解决加入 itemrender 后,自动换行不好使的问题。都是使用的mx2006的语法。

主要突破口是第二篇的一句话:

I tried a lot for this with multiple controls like TextInput, Textarea, Label etc by using the item render but was not getting the proper output.……………………………………But later I created my item render directly from the Text component and got the perfect result.

这里他说好使,是因为itemrender里面他用的mx:Text, 如果用 TextInput, Textarea, Label 之类的,wordwrap会失效

就这样。

 

flex datagrid itemrender wordwrap失效

原文:http://www.cnblogs.com/zklidd/p/4130212.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!