Scroll Livecode-滚动数据网格(带有最后一个偏移量)

Scroll Livecode-滚动数据网格(带有最后一个偏移量),scroll,datagrid,livecode,Scroll,Datagrid,Livecode,我已使用以下代码为我的datagrid创建了一个滚动控件: function scroller_create tPoint local tScrollerRect, tContentRect if environment() is not "mobile" then exit scroller_create put the rect of group "list" into tScrollerRect put 0,0,(the DGformattedWidth of g

我已使用以下代码为我的datagrid创建了一个滚动控件:

function scroller_create tPoint
   local tScrollerRect, tContentRect
   if environment() is not "mobile" then exit scroller_create

   put the rect of group "list" into tScrollerRect
   put 0,0,(the DGformattedWidth of group "list"),(the DGformattedHeight of group "list") into tContentRect

   mobileControlCreate "scroller", "listScroll"
   put the result into sScrollerID

   mobileControlSet "listScroll", "rect", tScrollerRect
   mobileControlSet "listScroll", "contentRect", tContentRect
   mobileControlSet "listScroll", "visible", true
   mobileControlSet "listScroll", "scrollingEnabled", true
   mobileControlSet "listScroll", "vIndicator", true
   mobileControlSet "listScroll", "vScroll", tPoint
end scroller_create
当更多数据被添加到datagrid中时,我将销毁并重新创建scroller控件。但是我想让滚动条停留在最后一个垂直滚动偏移(tPoint)上

但是使用mobileControlSet“listScroll”、“vScroll”、tPoint重新创建滚动条时,它仍会将垂直滚动条重置回顶部

有没有其他方法可以在最后一个偏移量上修复datagrid的vscroll


提前谢谢

为什么不直接更改上下文?
但是,请使用mobileControlGetvscroll存储在自定义属性中,然后重新设置。

Hi MaxV,谢谢您的评论。我已经成功地将DGVSCROL设置为显示列表,但只要我触摸手机屏幕(并滑动),列表将再次上升到顶部,然后再向下滑动。。。使用本机vScrollBar不会导致此问题。很奇怪。。。还在想办法解决这个问题。谢谢