LWUIT滚动 [英] LWUIT Scrolling
问题描述
这是有关JavaMe和LWUIT的另一个问题.
Here is another question regarding JavaMe and LWUIT.
我需要借助方法等手动滚动TextArea
.TextArea
包含仅负责获取当前滚动位置及其启用和禁用的方法.
I need to manually scroll TextArea
with help of methods or etc. TextArea
contains methods responsible only for obtaining current position of scrolling and its enable and disable.
我该怎么做?
我通过使用来自TextArea
的继承和受委托保护的滚动方法(相应地使用setScrollX和setScrollY)解决了问题.谢谢大家!
I solved problem by using inheritance from TextArea
and delegation protected methods of scrolling (setScrollX and setScrollY accordingly). Thanks to all!
推荐答案
TextArea扩展了TextField.在TextField类中,有一个setCursorPosition
方法.因此,我的建议是使用此方法,然后遍历TextArea内容,直到达到所需的特定位置为止.
TextArea extends TextField. In the TextField class there is the setCursorPosition
method. So my suggestion is to use this method and you loop through the TextArea content until a certain position you desire is reached.
这篇关于LWUIT滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!