0

Clients.scrollIntoView horizontal scroll

asked 2016-02-08 15:04:26 +0800

viking gravatar image viking
3 1

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?

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-02-14 16:12:28 +0800

Darksu gravatar image Darksu
1991 1 4

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

link publish delete flag offensive edit
Your answer
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
1 follower

RSS

Stats

Asked: 2016-02-08 15:04:26 +0800

Seen: 32 times

Last updated: Feb 14 '16

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