-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hi
I have two listboxes directly next to each other.
Both contain data that is longer than the page. So they got scrollbars.
Since the data belongs together line by line I want to scroll both listboxes at the same time if the user scrolls one of them.
Is this possible?
Thanks. Ralf
Hi rappr
In ZK5 you can control in client side
<zk xmlns:w="http://www.zkoss.org/2005/zk/client"> <window title="Livedata Demo" border="normal"> <zscript><![CDATA[ String[] data = new String[30]; for (int j = 0; j < data.length; ++j) { data = "option " + j; } ListModel strset = new SimpleListModel(data); ]]></zscript> <hbox> <listbox width="200px" rows="10" model="${strset}"> <attribute w:name="_doScroll"><![CDATA[ function () { this.$_doScroll(); this.nextSibling.ebody.scrollTop = this._currentTop; } ]]></attribute> <listhead> <listheader label="Load on demend" /> </listhead> </listbox> <listbox width="200px" rows="10" model="${strset}"> <attribute w:name="_doScroll"><![CDATA[ function () { this.$_doScroll(); this.previousSibling.ebody.scrollTop = this._currentTop; } ]]></attribute> <listhead> <listheader label="Load on demend 2" /> </listhead> </listbox> </hbox> </window> </zk>
Asked: 2010-05-06 15:34:40 +0800
Seen: 416 times
Last updated: May 09 '10