zoukankan      html  css  js  c++  java
  • 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会失效

    就这样。

  • 相关阅读:
    java之内部类与匿名内部类
    学习Android之内部类
    Android横竖屏切换总结
    java实现快速排序
    Palindrome Partitioning II
    Palindrome Partitioning
    Clone Graph
    Word Break
    Gas Station
    Candy
  • 原文地址:https://www.cnblogs.com/zklidd/p/4130212.html
Copyright © 2011-2022 走看看