-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi!
I've a Listbox with multiple rows and columns. Size of this grid needs scrollbars to appear. At some moment I need to be sure, that a specific cell is visible to user. To do this I use Clients.scrollIntoView providing Listcell which should be visible. The mechanism scrolls grid properly in matter of vertical scroll, yet horizontal remains as was before - it means that a cell may not be visible (and actually in my case is not visible in most cases). Shouldn't this method scroll vertical AND horizonal? Is there any other way to scroll grid to specific cell?
Hello viking,
Please refer to the following ticket:
http://tracker.zkoss.org/browse/ZK-1924
It says that it is fixed for 7.0.0, 6.5.5 and has attached the following example:
<zk>
<div height="200px" width="200px" style="overflow: auto">
<div height="400px" width="400px">
<box width="200px" height="200px" id="topLeft" pack="start" align="start" style="background-color: green;">topLeft</box>
<hbox>
<div width="200px" height="200px" />
<box width="200px" height="200px" id="bottomRight" pack="end" align="end" style="background-color: red;">bottomRight</box>
</hbox>
</div>
</div>
<button label="scroll to top-left component" onClick='Clients.scrollIntoView(topLeft);'/>
<button label="scroll to bottom-right component" onClick='Clients.scrollIntoView(bottomRight);'/>
</zk>
Best Regards,
Darksu
Asked: 2016-02-08 15:04:26 +0800
Seen: 40 times
Last updated: Feb 14 '16