如何使用动作脚本告诉 ScrollPane 向上或向下滚动?
我想触发一个事件,导致 ScrollPane 开始向上或向下滚动。
理想情况下,ScrollPane 会继续向上或向下滚动,除非被另一个事件取消。
I want to trigger an event that causes the ScrollPane to start scrolling up or down.
Ideally the ScrollPane would scroll continue to scroll all the way up or down unless canceled by another event.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
会是这样的:
您必须检查 _hmax 和 _vmax 以确保您不会滚动到内容的末尾,滚动条自然会停在此处。 我不记得这些变量的名称是什么,但是如果您在调试模式下运行程序并浏览滚动窗格实例,您应该找到它。 如果您将内置滚动条移至底部并查看哪些变量发生变化,然后找到匹配且静态的变量,可能会更容易。
Would be something like this:
You'll have to check the _hmax and _vmax to make sure you don't scroll past the end of the content, where the scrollbar would naturally stop at. I don't remember off the top of my head what the names of these variables are, but if you run your program in debug mode and poke around the scrollpane instance, you should find it. It'll probably be easier if you move the built-in scrollbar to the bottom and see what variable changes, then find the one that matches and is static.