开发者

Trouble with stylesheets in Flex 4

For 开发者_开发知识库the life of me, I can't get stylesheets to work... Something having to do with the namespaces and the way I am setting them. So here is my code:

<mx:Style>
  @namespace mx "library://ns.adobe.com/flex/halo";
  mx|DataGrid {
   headerColors: #0066cc, #00ffff;
   borderThickness: 7;
   borderColor: #00ff33;
  }
 </mx:Style>

<mx:DataGrid 
  styleName="myGridStyle"
  wordWrap="true"  
  id="people" 
  width="500" 
  height="350" 
  dataProvider="{dataArr}" 
  editable = "false" 
  itemClick="itemClickEvent(event);" sortableColumns="true"  
  rollOverColor="0xffffff"
  >

What am I doing wrong here? I've tried it many different ways and it seems to work for others in tutorials I have done.


The namespace has recently changed from:

@namespace mx "library://ns.adobe.com/flex/halo";

to

@namespace mx "library://ns.adobe.com/flex/mx";

mx instead of halo.

Let me know if that fixes it.

Lance


try to remove "styleName="myGridStyle"" in your datagrid declaration

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜