Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Deactivate Overscroll of Scrollboxes, TMemo, TListBox and TListView ?


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Last Post: Jul 11, 2016 12:53 PM Last Post By: Markus Humm
Ralf Eckhardt

Posts: 2
Registered: 4/30/16
Deactivate Overscroll of Scrollboxes, TMemo, TListBox and TListView ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 8, 2016 3:11 AM
[Delphi 10 Seattle]

Hello,

is there a possibility to deactivate the overscrolling of Scrollboxes, TMemo, TListBox and TListView.

What i mean is that on Android and IOS you can move the finger in those controls that the viewport gets negative values.
Typically you see this in Apps where a ListView has set/use the Option PullToRefresh.
Beside the point I think only when Listviews has set this option to true overscrolling is useful and should be enabled by default.

As partial solution i check in 'OnMouseMove' if the ViewportPosition becomes negative and set it back to 0.
But this not really stop the overscrolling - it is even more worse because the Screen is flickering.
I also tried some around with OnHScrollChange/OnVScrollChange or OnViewportPositionChange but i can't find any solution for this.

Someone got any other idea how i could deactivate this?

I saw something for Android: setOverScrollMode of ListViews (https://developer.android.com/reference/android/widget/AbsListView.html#setOverScrollMode%28int%29) ...
Eli M

Posts: 1,346
Registered: 11/9/13
Re: Deactivate Overscroll of Scrollboxes, TMemo, TListBox and TListView ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 10, 2016 6:27 AM   in response to: Ralf Eckhardt in response to: Ralf Eckhardt
Maybe

http://docwiki.embarcadero.com/Libraries/Seattle/en/FMX.InertialMovement.TAniCalculations

As a last resort you could also copy whatever RTL source file handles it to your project directly and disable the action there.
Ralf Eckhardt

Posts: 2
Registered: 4/30/16
Re: Deactivate Overscroll of Scrollboxes, TMemo, TListBox and TListView ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 11, 2016 7:15 AM   in response to: Eli M in response to: Eli M
Hey

i tried TAniCalculations as well.

There is only one option 'Elasticity' (http://docwiki.embarcadero.com/Libraries/Seattle/en/FMX.InertialMovement.TAniCalculations.Elasticity).
It feels like this option controls how fast the 'overscrolling' should return to ist 'normal' position.
I couldn't try 'AniCalculations.enabled' because there is no property at TScrollbox ...

I found a Property at TPresentedScrollbox:
http://docwiki.embarcadero.com/Libraries/Berlin/en/FMX.ScrollBox.TCustomPresentedScrollBox.Bounces

When you set this to 'TBehaviorBoolean.False' there is no overscrolling.
TMemo has this type of Scrollbox and there i can use this Option.

I tried to switch my TFramedVertScrollBox to TPresentedFramedVertScrollBox so i have this Option there too.... but no entries were shown...
This is because i don't get the difference between those controls with and without 'presented' and how i can add ChildControls at runtime.

.... this works for not presented....
vs := TFramedVertScrollBox.Create(Main_Frame);
bt := TButton.Create(vs);
bt.parent := vs;
....

Would this be an option to create TPresented... controls?
If yes then i need some Information about this type of control. :)
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Deactivate Overscroll of Scrollboxes, TMemo, TListBox and TListView ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 11, 2016 12:53 PM   in response to: Ralf Eckhardt in response to: Ralf Eckhardt
Am 11.07.2016 um 16:15 schrieb Ralf Eckhardt:
Hey

i tried TAniCalculations as well.

There is only one option 'Elasticity' (http://docwiki.embarcadero.com/Libraries/Seattle/en/FMX.InertialMovement.TAniCalculations.Elasticity).
It feels like this option controls how fast the 'overscrolling' should return to ist 'normal' position.
I couldn't try 'AniCalculations.enabled' because there is no property at TScrollbox ...

I found a Property at TPresentedScrollbox:
http://docwiki.embarcadero.com/Libraries/Berlin/en/FMX.ScrollBox.TCustomPresentedScrollBox.Bounces

When you set this to 'TBehaviorBoolean.False' there is no overscrolling.
TMemo has this type of Scrollbox and there i can use this Option.

I tried to switch my TFramedVertScrollBox to TPresentedFramedVertScrollBox so i have this Option there too.... but no entries were shown...
This is because i don't get the difference between those controls with and without 'presented' and how i can add ChildControls at runtime.

.... this works for not presented....
vs := TFramedVertScrollBox.Create(Main_Frame);
bt := TButton.Create(vs);
bt.parent := vs;
....

Would this be an option to create TPresented... controls?
If yes then i need some Information about this type of control. :)

Hello,

if you're on SA you could also use one of your 3 yearly tickets to try
to get a solution directly from EMBT. You need to log into maintenance
portal for this though, which is a special login the manager of your
licences at your company usually has.

Greetings

Markus
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02