现在我是想把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失效的更多相关文章

  1. Flex DataGrid可编辑对象实现Enter跳转

    来源:http://blog.sina.com.cn/s/blog_5ed17a730100vrja.html 在Flex DataGrid中实现点击Enter键可编辑对象跳转<?xml ver ...

  2. Flex DataGrid 添加控件

    哈喽,又和大家见面了.今天要写的东西是关于Flex DataGrid添加“编辑”或“删除”按钮. 下面是部分代码: <mx:DataGrid id="dgShow" x=&q ...

  3. flex datagrid 换行

    <mx:DataGrid id="myGrid" width="100%" height="90%" headerStyleName= ...

  4. flex datagrid checkbox选中项目

    <?xml version="1.0" encoding="utf-8"?>  <mx:Application xmlns:fx=" ...

  5. flex Datagrid checkbox

    <?xml version="1.0" encoding="utf-8"?><!-- http://blog.flexexamples.com ...

  6. flex引起height:100%失效

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  7. flex布局下overflow失效问题

    经常我们会使用flex布局,但是flex布局常常会遇到一些不可思议的麻烦,下面介绍一下overflow遇到的麻烦 我在工作中使用了左右两栏布局 .container { display: flex; ...

  8. flex datagrid 导出csv

    public function exportToCSV(dataGrid:DataGrid):void { var dataProviderCollection:ArrayCollection = d ...

  9. flex定位下overflow失效的问题研究

    概述 这是我在写移动端页面遇到的问题及解决方法,记录下来供以后开发时参考,相信对其他人也有用. 问题 之前写移动端页面,有一个顶条是导航条,需要固定在页面顶部,并且里面的元素需要可以左右滚动. 但是当 ...

随机推荐

  1. Linux下使用GDB进行调试

    Linux下使用GDB进行调试的常用命令记于此. $ sudo su # g++ -g test.cpp -o test -pthread # gdb test         <------- ...

  2. http://blog.chinaunix.net/uid-20577907-id-3519578.html

    http://blog.chinaunix.net/uid-20577907-id-3519578.html

  3. 【RabbitMQ 参考资料】

    RabbitMQ从入门到精通:http://blog.csdn.net/column/details/rabbitmq.html RabbitMQ消息队列(一): Detailed Introduct ...

  4. centos 7 安装gcc g++

    yum install gcc gcc-c++ over. ps:如果系统报yum命令未找到,退出重新登陆试试root.

  5. [TypeScript] Dynamically Allocate Function Types with Conditional Types in TypeScript

    Conditional types take generics one step further and allow you to test for a specific condition, bas ...

  6. 【C/C++学院】0831-类与对象的异常/面试100题1-100

    类与对象的异常 Cpp异常 #include <iostream> #include <string.h> using namespace std; //标识错误的类型 cla ...

  7. [Unity3D]查看与设置游戏帧数FPS

    原地址:http://blog.sina.com.cn/s/blog_5b6cb9500101bta4.html 关于FPS,在PC端来说,游戏帧数跑得越高越好,FPS跑得越高游戏就越流畅,当然太高也 ...

  8. Androidproject师进阶之路 :《Android开发进阶:从小工到专家》上市啦!

    封面 文件夹1 文件夹2 - 当当购买链接 - 京东购买链接 为什么写这本书 写这本书的念头由来已久了. 或许是从我打算写<Android源代码设计模式解析与实战>那时起就萌生了这个念头, ...

  9. centos7,py2和py3共存

    1.查看是否已经安装Python CentOS 7.2 默认安装了python2.7.5 因为一些命令要用它比如yum 它使用的是python2.7.5. 使用 python -V 命令查看一下是否安 ...

  10. 【MyBatis学习13】MyBatis中的二级缓存

    1. 二级缓存的原理 前面介绍了,mybatis中的二级缓存是mapper级别的缓存,值得注意的是,不同的mapper都有一个二级缓存,也就是说,不同的mapper之间的二级缓存是互不影响的.为了更加 ...