我使用下面的代码为数据网格本地的Adroid滚动和它的作品几乎确定。 几乎在我的筹码,因为在一个特定的观点似乎是不可靠的。 下载堆栈和检查以下内容:去来回3-4次“我的书”与“我的选择”,然后在某一点上滚动不会在“我的类别”视图中工作之间点击。 然后,我必须重新启动应用程序,它的工作原理确定。 你觉得它取决于? 该代码是:
on openCard
local tScrollerRect, tContentRect
// Only create a scroller on a mobile device
if environment() is not "mobile" then exit openCard
// Set the area of the scroller
put the rect of group "DataGrid 1" into tScrollerRect
// Set the area of the content to be scrolled
put 0,0,(the DGformattedWidth of group "DataGrid 1"),(the DGformattedHeight of group "DataGrid 1") into tContentRect
// Create the scroller control
mobileControlCreate "scroller", "loremScroll"
put the result into sScrollerID
// Set the properties of the scroller
mobileControlSet "loremScroll", "rect", tScrollerRect
mobileControlSet "loremScroll", "contentRect", tContentRect
mobileControlSet "loremScroll", "visible", true
mobileControlSet "loremScroll", "scrollingEnabled", true
mobileControlSet "loremScroll", "vIndicator", true
mobileControlSet "loremScroll", "vscroll", 0
end openCard
on closeCard
// Delete the scroller
if environment() is not "mobile" then exit closeCard
mobileControlDelete sScrollerID
end closeCard
on scrollerDidScroll hOffset, vOffset
// When the user scrolls move the displayed content
set the DGvScroll of group "DataGrid 1" to vOffset
end scrollerDidScroll
您也可以下载堆在这里 。