我想知道StyledText实际显示了多少行。这有可能吗?
谢谢。
发布于 2011-11-04 22:29:18
尝试以下代码:
// The index of the last (possibly only partially) visible line of the widget
int bottomIndex = JFaceTextUtil.getPartialBottomIndex((StyledText)widget);
// The index of the first (possibly only partially) visible line of the widget
int topIndex = JFaceTextUtil.getPartialTopIndex((StyledText)widget);
int visibleLines = bottomIndex - topIndex;https://stackoverflow.com/questions/8010661
复制相似问题