Disable the scroll temporarily ,of a TvertScrollBox component in Delphi?

我的梦境 提交于 2019-12-12 23:05:21

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/39765564/disable-the-scroll-temporarily-of-a-tvertscrollbox-component-in-delphi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!