我正在开发一个适用于安卓,iPhone,视窗的livecode应用。我想将滚动条添加到组中。所以我将组的垂直滚动条设置为true,它在右边有一个垂直滚动条,效果很好。但当它在android上测试时,仍然有一个用于滚动的竖条,我认为它可能会自动像Android自带的基本滚动条一样工作。
我想添加一个触摸滚动,而不是一个垂直滚动的Android和Iphone。我怎么能做到这一点?
发布于 2013-07-22 16:27:23
本课介绍如何为文本字段创建本机滚动条。但是,此方法可以在任何组上实现-
http://lessons.runrev.com/s/lessons/m/4069/l/94412-creating-a-native-scroller-to-scroll-a-field
发布于 2013-08-14 00:50:13
我向原作者道歉,由于缺乏属性,这里有一些脚本,它将允许在桌面和移动平台上滚动组,并且不使用原生iOS或安卓滚动“覆盖”:
local allowMove
on mouseDown
put mouseH(),mouseV() into allowMove
end mouseDown
on mouseMove X,Y
if allowMove is not empty then
lock screen
if the hScrollbar of me then
set the hScroll of me to the hScroll of me + (item 1 of allowMove-X)
end if
if the vScrollbar of me then
set the vScroll of me to the vScroll of me + (item 2 of allowMove-Y)
end if
put X into item 1 of allowMove
put Y into item 2 of allowMove
unlock screen
end if
end mouseMove
on mouseUp
put empty into allowMove
end mouseUp
on mouseRelease
mouseUp
end mouseRelease原始脚本已由我略微修改,以允许滚动,只有当相应的滚动条是可见的。这使得在不同方向上启用或禁用滚动变得非常快速和容易。我用它来做原型。
https://stackoverflow.com/questions/17782585
复制相似问题