-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have copied and pasted the code from ZK demo for the Tree example. I don't want the text to wrap within a tree, at the same time I don't want to truncate the text without the ability to display the whole text if the user resizes the column. How can this be accomplished?
In the example below, you will see that the first treecell wraps the text - how can we prevent ZK from wrapping it, while displaying the text that can fit into the treecell (and displaying more if the column is resized and expanded)
Example:*************************************
<hbox width="100%">
<vbox>
Four style of trees :
<radiogroup
onCheck='tree.setZclass("z-"+self.selectedItem.value)'>
<vbox>
<radio label="Default" value="tree" selected="true"/>
<radio label="Dot Tree" value="dottree" />
<radio label="XP Explorer" value="filetree" />
<radio label="Vista Explorer" value="vfiletree" />
</vbox>
</radiogroup>
</vbox>
<tree id="tree" width="400px" rows="8">
<treecols sizable="true">
<treecol label="Name" />
<treecol label="Description" />
</treecols>
<treechildren>
<treeitem>
<treerow>
<treecell label="Item 1 - THIS ONE HAS A REALLY REALLY LONG DESCRIPTION" />
<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" />
<treecell
label="Item 2.2 is something who cares" />
</treerow>
</treeitem>
</treechildren>
</treeitem>
<treeitem label="Item 3" />
</treechildren>
</tree>
</hbox>
Sorry for the duplicated posting.
At first glance, I try to solve the problem by set style property.
But word-wrap, text-wrap is CSS 3 only.
Firefox 3 not support CSS 3 yet. Firefox 3 support CSS 2.
Other browser has same situation.
Therefore, the problem can't be easily solved by now.
Please post it to feature request.
Asked: 2008-12-13 16:09:11 +0800
Seen: 611 times
Last updated: Dec 17 '08