0

Problem to resize tree header on css style

asked 2011-01-30 03:00:33 +0800

shiny gravatar image shiny
27

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>

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2011-01-30 22:45:50 +0800

zero5 gravatar image zero5
75

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.

link publish delete flag offensive edit

answered 2011-01-31 00:09:29 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

updated 2011-01-31 00:10:31 +0800

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>

...

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-01-30 03:00:33 +0800

Seen: 422 times

Last updated: Jan 31 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More