-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I am trying to learn ZK, and I am running into issues. I am trying to have a HBox layout containing a Tree control, but the splitters do not seem to resize properly. Dragging the splitters only works intermittently. After I collapse the left side, I expand it and the right side is no longer resizeable. Am I doing something wrong?
To see the behavior I am writing about, load the following demo url and paste the code in to the source window.
http://www.zkoss.org/zksandbox/#l13
Source code:
<window>
<panel title="Splitter" border="normal" width="500px">
<panelchildren>
<hbox spacing="0" width="100%" height="100%">
<vbox spacing="0" heights="100px,100px">
Column 1-1: The left-top box. To know whether a splitter
is collapsed, you can listen to the onOpen event.
<splitter id="s1" collapse="before"/>
Column 1-2: You can enforce to open or collapse programming
by calling setOpen method.
</vbox>
<splitter id="s2" collapse="before"/>
<tree id="myTree">
<treecols>
<treecol label="Name" />
</treecols>
<treechildren>
<treeitem>
<treerow>
<treecell label="Test" />
</treerow>
</treeitem>
</treechildren>
</tree>
</hbox>
</panelchildren>
</panel>
<button label="change style">
<attribute name="onClick">
if ("z-splitter-ver".equals(s1.getZclass()))
s1.setZclass("z-splitter-os-ver");
else
s1.setZclass("z-splitter-ver");
if ("z-splitter-hor".equals(s2.getZclass()))
s2.setZclass("z-splitter-os-hor");
else
s2.setZclass("z-splitter-hor");
</attribute>
</button>
</window>
Asked: 2011-10-17 16:10:40 +0800
Seen: 230 times
Last updated: Oct 20 '11