flex datagrid itemrender wordwrap失效

现在我是想把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会失效

就这样。

 

转载于:https://www.cnblogs.com/zklidd/p/4130212.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值