如何知道GWT ScrollPanel中正在显示哪个元素 [英] How to know which element is being displayed in GWT ScrollPanel

查看:56
本文介绍了如何知道GWT ScrollPanel中正在显示哪个元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关GWT ScrollPanel的问题.

A question about GWT ScrollPanel.

有什么方法可以确定在ScrollPanel中显示哪个子元素?

Is there any way to determine which child element is being displayed in ScrollPanel?

(当然,ScrollPanel包含具有HTML对象的DecoratorPanel)

(Of course, ScrollPanel contains DecoratorPanel that has HTML object)

推荐答案

AFAIK没有内置功能,DOM和GWT中都没有.

AFAIK there is no built-in functionality to do so, not in DOM nor in GWT.

如果具有固定的高度元素,则可以尝试计算是否显示了某些元素:

If you have fixed height elements you might try to calculate if certain element is shown: Check if element is visible after scrolling

这篇关于如何知道GWT ScrollPanel中正在显示哪个元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆