-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hello,
I am using the tree example in the live data demo,My problem is that resize the tree header,the tree column display incorrectly,please help!!
<code>
<hbox width="100%">
<style>
.z-tree-cell .z-tree-cell-cnt {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
</style>
<tree id="tree" width="400px" fixedLayout="true">
<treecols sizable="true">
<treecol label="Name" width="80px"/>
<treecol label="Description" width="200px"/>
</treecols>
<treechildren>
<treeitem>
<treerow>
<treecell label="Item 1" />
<treecell label="Item 1 description" />
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell label="Item 2" />
<treecell label="Item 2 description" />
</treerow>
<treechildren>
<treeitem>
<treerow>
<treecell label="Item 2.1" />
</treerow>
<treechildren>
<treeitem>
<treerow>
<treecell label="Item 2.1.1" />
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell label="Item 2.1.2" />
</treerow>
</treeitem>
</treechildren>
</treeitem>
<treeitem>
<treerow>
<treecell label="Item 2.2" />
</treerow>
<treechildren>
<treeitem>
<treerow>
<treecell label="Item 2.2.1" />
</treerow>
</treeitem>
</treechildren>
</treeitem>
</treechildren>
</treeitem>
<treeitem label="Item 3" />
</treechildren>
</tree>
</hbox>
</code>
I don't really run the example you provided, but, according to my experience, it is better not to place tree in hbox. Rather you could use hlayout instead. It is because hbox uses TABLE, whose behavior is hard to control (especially in IE). Just my two cents.
Do you mean the "ellipsis"? Please remove the "-" between "tree" and "cell". However, note that elllipsis is an IE specific CSS style. It will only works in IE.
<style> .z-treecell .z-treecell-cnt { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } </style> ...
Asked: 2011-01-30 03:00:33 +0800
Seen: 422 times
Last updated: Jan 31 '11