2012-03-02 26 views
1

此树面板节点标签突破是树在extjs4

{ 
    text:'more then a_veryverylongword ', 
    leaf: true 
} 

这里节点的问题是,是不是显示一个非常非常长的字,但如果我调整面板显示的字?

有人告诉我,我该怎么做才能打破这个词? CSS不工作来修改面板的大小不是一个选项。

感谢

+0

可以张贴代码或代码的一部分? – 2012-03-02 11:17:13

回答

0

这里是样品编辑从煎茶,其工作代码...

var store = Ext.create('Ext.data.TreeStore', { 
    root: { 
     expanded: true, 
     children: [ 
      { text: "detention", leaf: true }, 
      { text: "homework", expanded: true, children: [ 
       { text: "book report", leaf: true }, 
       { text: 'more then a_veryverylongword ', leaf: true} 
      ] }, 
      { text: "buy lottery tickets", leaf: true } 
     ] 
    } 
}); 

Ext.create('Ext.tree.Panel', { 
    title: 'Simple Tree', 
    width: 250, 
    height: 150, 
    store: store, 
    rootVisible: false, 
    renderTo: Ext.getBody() 
}); 
+0

doLayout不工作:(谢谢:) – tallica 2012-03-02 10:27:14