暂时禁用Delphi中TvertScrollBox组件的滚动? [英] Disable the scroll temporarily ,of a TvertScrollBox component in Delphi?

查看:121
本文介绍了暂时禁用Delphi中TvertScrollBox组件的滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在柏林Delphi Rad Studio XE10.1中为IOS和Android设备制作应用程序,但是有问题.

在表单中,我有一个 TvertScrollbox ,其中有许多要显示的组件,其中一个是 Tlistview .

问题是,当我在 Tlistview 中进行 scroll 时,由于显示的数据更多,因此也会在 TvertScrollbox 中进行滚动code>,最终无法正确显示数据.

是否可以暂时禁用 TvertScrollbox 滚动,然后再次启用?

我希望我已经解释清楚了.我的英语不好,谢谢.

解决方案

是的,您可以通过简单地将AniCalculations.TouchTracking:= []放回AniCalculations.TouchTracking:= [ttVertical]

我制作了一个TvertscollBox,它实现了所有此类行为(在滚动子对象时取消滚动),并且还纠正了其他一些错误……源代码太大,无法在此处复制,因此您可以直接在这里查看:

(svn) https://svn.code.sf.net/p/alcinoe/code/

查看单位ALFmxLayouts

如果要查看禁用滚动的演示,请查看项目/demos/alfmxControls/或直接加载 https://sourceforge.net/p/alcinoe/code/HEAD/tree/demos/ALFmxControls/Android/Release/ALFmxControls/bin/ALFmxControls.apk?format = raw 或缩短变体(如果需要编写)在android中手动进行:http://tinyurl.com/zsamrbn(要在android上安装的已编译apk的网址)在演示中,您可以看到一个tab控件,当您滚动它时,vertscrollbox的滚动被停用

I am making an application for IOS and Android devices in Delphi Rad Studio XE10.1 Berlin, and I have a problem.

In a form, I have a TvertScrollbox, and within it, there is many components to display, and one of them is a Tlistview.

The problem is, when I make a scroll in the Tlistview, because there is more data that shows, also makes a scroll in the TvertScrollbox, which in the end is impossible to visualize the data correctly.

Is there any way to disable the scroll of the TvertScrollbox temporarily, and then enable again?

I hope I have explained well. My English is very bad, Thank you.

解决方案

Yes you can disable the TvertScrollbox by simply putting AniCalculations.TouchTracking := [] and then put it back to AniCalculations.TouchTracking := [ttVertical]

I made a TvertscollBox that implement all of this kind of behavior (deactivate the scroll when child object are scrolling), and that also correct some other bug ... the source code is too big to copy past here, so you can see it directly here :

(svn) https://svn.code.sf.net/p/alcinoe/code/

look the unit ALFmxLayouts

if you want to see a demo of the scroll deactivation look the project /demos/alfmxControls/ or load directly https://sourceforge.net/p/alcinoe/code/HEAD/tree/demos/ALFmxControls/Android/Release/ALFmxControls/bin/ALFmxControls.apk?format=raw or the shorten variant if you need to write it manually in android: http:// tinyurl .com/zsamrbn (url of the compiled apk to install on android) in the demo you can see a tabcontrol, when you scroll on it, the scroll of the vertscrollbox is deactivated

这篇关于暂时禁用Delphi中TvertScrollBox组件的滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆