提交 86365e9f 编写于 作者: S Serge Rider

Grid vertical scrolling

上级 a32cfd23
......@@ -1786,8 +1786,11 @@ public abstract class LightGrid extends Canvas {
*
* @param item the item to be shown
*/
public void showItem(int item)
{
public void showItem(int item) {
showItem(item, -1);
}
public void showItem(int item, int topOffset) {
checkWidget();
updateScrollbars();
......@@ -1797,6 +1800,11 @@ public abstract class LightGrid extends Canvas {
return;
}
if (topOffset >= 0) {
setTopIndex(Math.max(0, item - topOffset));
return;
}
// if its visible just return
if (isShown(item)) {
return;
......@@ -2403,7 +2411,7 @@ public abstract class LightGrid extends Canvas {
// if the scrollbar is visible set its values
if (vScroll.getVisible()) {
int max = getItemCount();
int max = getItemCount() + 1;
int thumb = (getVisibleGridHeight() + 1) / (getItemHeight() + 1);
// if possible, remember selection, if selection is too large, just
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册